summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-04-22 01:49:48 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-04-22 01:49:48 +0000
commit18b94f129d1e363bff283c71c2432d704c1473c5 (patch)
treeaccba28e432d8729734f09dd32ea2333a18d6f69 /gtk2_ardour
parentc287ebec9b92d7abb48a92daf11bac0152cc6789 (diff)
lincoln's route connection cleanup patch
git-svn-id: svn://localhost/ardour2/branches/3.0@4996 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_mixer.cc16
-rw-r--r--gtk2_ardour/editor_route_list.cc5
-rw-r--r--gtk2_ardour/mixer_strip.cc3
-rw-r--r--gtk2_ardour/route_ui.cc12
4 files changed, 14 insertions, 22 deletions
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc
index 2f858f99a0..1b9b2a85df 100644
--- a/gtk2_ardour/editor_mixer.cc
+++ b/gtk2_ardour/editor_mixer.cc
@@ -78,7 +78,7 @@ Editor::show_editor_mixer (bool yn)
if (yn) {
if (selection->tracks.empty()) {
-
+
if (track_views.empty()) {
show_editor_mixer_when_tracks_arrive = true;
return;
@@ -94,7 +94,6 @@ Editor::show_editor_mixer (bool yn)
}
} else {
-
sort_track_selection ();
for (TrackSelection::iterator i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
@@ -183,7 +182,6 @@ void
Editor::set_selected_mixer_strip (TimeAxisView& view)
{
RouteTimeAxisView* at;
- bool show = false;
bool created;
if (!session || (at = dynamic_cast<RouteTimeAxisView*>(&view)) == 0) {
@@ -191,6 +189,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
}
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
+
if (act) {
Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
if (!tact || !tact->get_active()) {
@@ -212,19 +211,11 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
return;
}
- if (current_mixer_strip->get_parent()) {
- show = true;
- }
-
- current_mixer_strip->set_route (at->route());
-
if (created) {
current_mixer_strip->set_width (editor_mixer_strip_width, (void*) this);
}
- if (show) {
- show_editor_mixer (true);
- }
+ current_mixer_strip->set_route (at->route());
}
double current = 0.0;
@@ -300,7 +291,6 @@ Editor::update_current_screen ()
}
} else {
-
if (frame != last_update_frame) {
playhead_cursor->set_position (frame);
}
diff --git a/gtk2_ardour/editor_route_list.cc b/gtk2_ardour/editor_route_list.cc
index 8ab6d5fe59..603be60068 100644
--- a/gtk2_ardour/editor_route_list.cc
+++ b/gtk2_ardour/editor_route_list.cc
@@ -204,7 +204,8 @@ Editor::remove_route (TimeAxisView *tv)
next_tv = (*i);
}
}
- if (current_mixer_strip && current_mixer_strip->route() == route) {
+
+ if (current_mixer_strip && current_mixer_strip->route() == route) {
if (next_tv) {
set_selected_mixer_strip (*next_tv);
@@ -215,7 +216,7 @@ Editor::remove_route (TimeAxisView *tv)
ActionManager::uncheck_toggleaction ("<Actions>/Editor/show-editor-mixer");
}
- }
+ }
}
void
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 8823e2810e..fc358b8f7b 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -416,9 +416,6 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
connections.push_back (_route->meter_change.connect (mem_fun(*this, &MixerStrip::meter_changed)));
connections.push_back (_route->input_changed.connect (mem_fun(*this, &MixerStrip::input_changed)));
connections.push_back (_route->output_changed.connect (mem_fun(*this, &MixerStrip::output_changed)));
- connections.push_back (_route->mute_changed.connect (mem_fun(*this, &RouteUI::mute_changed)));
- connections.push_back (_route->solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed)));
- connections.push_back (_route->solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed)));
connections.push_back (_route->mix_group_changed.connect (mem_fun(*this, &MixerStrip::mix_group_changed)));
connections.push_back (_route->panner().Changed.connect (mem_fun(*this, &MixerStrip::connect_to_pan)));
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 5e89d6292a..40d0ae8da5 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -124,6 +124,11 @@ RouteUI::init ()
void
RouteUI::reset ()
{
+ //Remove route connections associated with us.
+ for (vector<sigc::connection>::iterator it = connections.begin(); it!=connections.end(); ++it) {
+ (*it).disconnect();
+ }
+
connections.clear ();
delete solo_menu;
@@ -180,10 +185,6 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
connections.push_back (_route->solo_changed.connect (mem_fun(*this, &RouteUI::solo_changed)));
connections.push_back (_route->solo_safe_changed.connect (mem_fun(*this, &RouteUI::solo_changed)));
- /* when solo changes, update mute state too, in case the user wants us to display it */
-
- _session.SoloChanged.connect (mem_fun(*this, &RouteUI::solo_changed_so_update_mute));
-
if (is_track()) {
boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track>(_route);
@@ -207,6 +208,9 @@ RouteUI::set_route (boost::shared_ptr<Route> rp)
/* map the current state */
+ mute_changed (0);
+ solo_changed (0);
+
map_frozen ();
}