diff options
-rw-r--r-- | gtk2_ardour/vca_master_strip.cc | 7 | ||||
-rw-r--r-- | gtk2_ardour/vca_master_strip.h | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gtk2_ardour/vca_master_strip.cc b/gtk2_ardour/vca_master_strip.cc index 34bebc9be9..ba1b58d3bc 100644 --- a/gtk2_ardour/vca_master_strip.cc +++ b/gtk2_ardour/vca_master_strip.cc @@ -23,6 +23,7 @@ #include "ardour/vca.h" #include "ardour/vca_manager.h" +#include "gtkmm2ext/doi.h" #include "gtkmm2ext/keyboard.h" #include "gui_thread.h" @@ -155,7 +156,7 @@ VCAMasterStrip::~VCAMasterStrip () void VCAMasterStrip::self_delete () { - delete this; + delete_when_idle (this); } void @@ -192,6 +193,10 @@ VCAMasterStrip::name() const void VCAMasterStrip::hide_clicked () { + /* get everything to deassign. This will also delete ourselves (when + * idle) and that in turn will remove us from the Mixer GUI + */ + _session->vca_manager().remove_vca (_vca); } bool diff --git a/gtk2_ardour/vca_master_strip.h b/gtk2_ardour/vca_master_strip.h index d8ef778ee1..b3fdc5d310 100644 --- a/gtk2_ardour/vca_master_strip.h +++ b/gtk2_ardour/vca_master_strip.h @@ -39,6 +39,7 @@ class VCAMasterStrip : public AxisView, public Gtk::EventBox { public: VCAMasterStrip (ARDOUR::Session*, boost::shared_ptr<ARDOUR::VCA>); + ~VCAMasterStrip (); std::string name() const; std::string state_id() const { return "VCAMasterStrip"; } @@ -47,8 +48,6 @@ class VCAMasterStrip : public AxisView, public Gtk::EventBox static PBD::Signal1<void,VCAMasterStrip*> CatchDeletion; private: - ~VCAMasterStrip (); - boost::shared_ptr<ARDOUR::VCA> _vca; Gtk::HBox vertical_padding; ArdourButton name_button; |