Fix track-record-axis cleanup, duplicate self delete

Also hide/delete IOSelector dialogues early on when closing
the session.
This commit is contained in:
Robin Gareus 2021-02-26 02:54:45 +01:00
parent ad9e44e92a
commit 61b29c5810
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 9 additions and 7 deletions

View File

@ -297,11 +297,15 @@ RouteUI::set_session (ARDOUR::Session*s)
{
SessionHandlePtr::set_session (s);
/* This is needed to clean out IDs of sends, when using output selector
* with MixerStrip::_current_delivery
*/
if (!s) {
assert (input_selectors.empty ());
/* This is needed to clean out IDs of sends, when using output selector
* with MixerStrip::_current_delivery.
* It's also prudent to hide/destroy input-selectors early, before delayed
* self_delete() can do that in the ~RouteUI.
*/
for (IOSelectorMap::const_iterator i = input_selectors.begin(); i != input_selectors.end() ; ++i) {
delete i->second;
}
for (IOSelectorMap::const_iterator i = output_selectors.begin(); i != output_selectors.end() ; ++i) {
delete i->second;
}

View File

@ -297,7 +297,7 @@ protected:
virtual void blink_rec_display (bool onoff);
virtual void map_frozen ();
void self_delete ();
virtual void self_delete ();
virtual void start_step_editing () {}
virtual void stop_step_editing() {}

View File

@ -98,8 +98,6 @@ TrackRecordAxis::TrackRecordAxis (Session* s, boost::shared_ptr<ARDOUR::Route> r
RouteUI::set_route (rt);
_route->DropReferences.connect (_route_connections, invalidator (*this), boost::bind (&TrackRecordAxis::self_delete, this), gui_context ());
UI::instance ()->theme_changed.connect (sigc::mem_fun (*this, &TrackRecordAxis::on_theme_changed));
UIConfiguration::instance ().ColorsChanged.connect (sigc::mem_fun (*this, &TrackRecordAxis::on_theme_changed));
UIConfiguration::instance ().DPIReset.connect (sigc::mem_fun (*this, &TrackRecordAxis::on_theme_changed));