diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-25 21:06:52 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-12-25 21:06:52 +0000 |
commit | b6f4cdaea27fbf49f924b2684d4c638089314067 (patch) | |
tree | 4328e93333d13eccadc18455ba32a7293d3cbd73 /gtk2_ardour/mixer_ui.cc | |
parent | f53cbaede885cd52b8fee59890e33575a4fc11fa (diff) |
rationalize destruction pathway (some more); tidy-ify some ImageFrame code
git-svn-id: svn://localhost/ardour2/branches/3.0@6398 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/mixer_ui.cc')
-rw-r--r-- | gtk2_ardour/mixer_ui.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index dc3b95a68f..b750f8a470 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -250,6 +250,8 @@ Mixer_UI::Mixer_UI () group_display.show(); auto_rebinding = FALSE; + + MixerStrip::CatchDeletion.connect (*this, ui_bind (&Mixer_UI::remove_strip, this, _1), gui_context()); _plugin_selector = new PluginSelector (PluginManager::the_manager ()); } @@ -334,7 +336,6 @@ Mixer_UI::add_strip (RouteList& routes) } route->NameChanged.connect (*this, boost::bind (&Mixer_UI::strip_name_changed, this, strip), gui_context()); - route->DropReferences.connect (*this, boost::bind (&Mixer_UI::remove_strip, this, strip), gui_context()); strip->WidthChanged.connect (sigc::mem_fun(*this, &Mixer_UI::strip_width_changed)); strip->signal_button_release_event().connect (sigc::bind (sigc::mem_fun(*this, &Mixer_UI::strip_button_release_event), strip)); @@ -350,7 +351,14 @@ Mixer_UI::add_strip (RouteList& routes) void Mixer_UI::remove_strip (MixerStrip* strip) { - ENSURE_GUI_THREAD (*this, &Mixer_UI::remove_strip, strip) + if (_session && _session->deletion_in_progress()) { + /* its all being taken care of */ + return; + } + + ENSURE_GUI_THREAD (*this, &Mixer_UI::remove_strip, strip); + + cerr << "Mixer UI removing strip for " << strip << endl; TreeModel::Children rows = track_model->children(); TreeModel::Children::iterator ri; |