summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mixer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2007-11-04 23:18:15 +0000
committerCarl Hetherington <carl@carlh.net>2007-11-04 23:18:15 +0000
commit5bf892728c54f56d9d65eff967bfafda3fbdc4e2 (patch)
tree2e3ab9f8dbb2422f56d65df9a71e77992c2367b6 /gtk2_ardour/editor_mixer.cc
parent39bdbf5db91ede6f3bef27ca614cf6702c0488be (diff)
Select another track when one is deleted, thereby allowing the editor mixer to stick around if it's displayed. Should fix #1542.
git-svn-id: svn://localhost/ardour2/trunk@2588 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mixer.cc')
-rw-r--r--gtk2_ardour/editor_mixer.cc26
1 files changed, 11 insertions, 15 deletions
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc
index dee928b62f..669297b6e4 100644
--- a/gtk2_ardour/editor_mixer.cc
+++ b/gtk2_ardour/editor_mixer.cc
@@ -58,6 +58,13 @@ Editor::editor_list_button_toggled ()
}
void
+Editor::cms_new (boost::shared_ptr<ARDOUR::Route> r)
+{
+ current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(), *session, r);
+ current_mixer_strip->GoingAway.connect (mem_fun (*this, &Editor::cms_deleted));
+}
+
+void
Editor::cms_deleted ()
{
current_mixer_strip = 0;
@@ -83,12 +90,7 @@ Editor::show_editor_mixer (bool yn)
AudioTimeAxisView* atv;
if ((atv = dynamic_cast<AudioTimeAxisView*> (*i)) != 0) {
-
- current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(),
- *session,
- atv->route(), false);
-
- current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted));
+ cms_new (atv->route ());
break;
}
}
@@ -101,11 +103,7 @@ Editor::show_editor_mixer (bool yn)
AudioTimeAxisView* atv;
if ((atv = dynamic_cast<AudioTimeAxisView*> (*i)) != 0) {
-
- current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(),
- *session,
- atv->route(), false);
- current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted));
+ cms_new (atv->route ());
break;
}
}
@@ -175,10 +173,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view)
current_mixer_strip = 0;
}
- current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(),
- *session,
- rt->route());
- current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted));
+ cms_new (rt->route ());
if (show) {
show_editor_mixer (true);
@@ -390,3 +385,4 @@ Editor::maybe_add_mixer_strip_width (XMLNode& node)
node.add_property ("mixer-width", enum_2_string (current_mixer_strip->get_width()));
}
}
+