diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-10-11 17:02:57 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-10-11 17:02:57 +0000 |
commit | 5f88eeb157b061978d665efa6a7d8ac5118e6753 (patch) | |
tree | 1bf7f298568d9d59323ffde41fe45f7ec5f07d99 /gtk2_ardour/editor_mixer.cc | |
parent | 08c036568f8adf5bb3092deba933456cad7d1253 (diff) |
test another fix for solo-press-crashes
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3929 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mixer.cc')
-rw-r--r-- | gtk2_ardour/editor_mixer.cc | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index b81ed79b07..42407100f0 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -56,6 +56,8 @@ Editor::cms_deleted () void Editor::show_editor_mixer (bool yn) { + boost::shared_ptr<ARDOUR::Route> r; + show_editor_mixer_when_tracks_arrive = false; if (!session) { @@ -64,27 +66,18 @@ Editor::show_editor_mixer (bool yn) if (yn) { - if (current_mixer_strip == 0) { - - current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(), - *session, - false); - current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted)); - } - - if (selection->tracks.empty()) { if (track_views.empty()) { show_editor_mixer_when_tracks_arrive = true; return; } - + for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) { AudioTimeAxisView* atv; if ((atv = dynamic_cast<AudioTimeAxisView*> (*i)) != 0) { - current_mixer_strip->set_route (atv->route()); + r = atv->route(); break; } } @@ -97,11 +90,23 @@ Editor::show_editor_mixer (bool yn) AudioTimeAxisView* atv; if ((atv = dynamic_cast<AudioTimeAxisView*> (*i)) != 0) { - current_mixer_strip->set_route (atv->route()); + r = atv->route(); break; } } } + + if (r) { + if (current_mixer_strip == 0) { + + current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(), + *session, + false); + current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted)); + } + + current_mixer_strip->set_route (r); + } if (current_mixer_strip->get_parent() == 0) { current_mixer_strip->set_embedded (true); |