diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-18 22:02:14 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:43 -0400 |
commit | 808346de0fb0d1a8f82e61224844fade1bd5ec5b (patch) | |
tree | f5bc7f9963e22584a996572593e6a2a0b64b8135 /gtk2_ardour/vca_master_strip.cc | |
parent | 69d2758e8c617b2d6da0e9b2729a7b46652496b1 (diff) |
vca: make Remove context menu option work
Also cancel spill view if relevant, during VCA Master Strip deletion
Diffstat (limited to 'gtk2_ardour/vca_master_strip.cc')
-rw-r--r-- | gtk2_ardour/vca_master_strip.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gtk2_ardour/vca_master_strip.cc b/gtk2_ardour/vca_master_strip.cc index e40dd96ba3..f0e7cfac90 100644 --- a/gtk2_ardour/vca_master_strip.cc +++ b/gtk2_ardour/vca_master_strip.cc @@ -168,6 +168,11 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v) VCAMasterStrip::~VCAMasterStrip () { + if ((_session && !_session->deletion_in_progress()) && Mixer_UI::instance()->showing_vca_slaves_for (_vca)) { + /* cancel spill for this VCA */ + Mixer_UI::instance()->show_vca_slaves (boost::shared_ptr<VCA>()); + } + delete delete_dialog; delete context_menu; @@ -476,7 +481,7 @@ VCAMasterStrip::build_context_menu () context_menu = new Menu; MenuList& items = context_menu->items(); items.push_back (MenuElem (_("Rename"), sigc::mem_fun (*this, &VCAMasterStrip::start_name_edit))); - items.push_back (MenuElem (_("Remove"))); + items.push_back (MenuElem (_("Remove"), sigc::mem_fun (*this, &VCAMasterStrip::remove))); } void @@ -498,3 +503,13 @@ VCAMasterStrip::spill_change (boost::shared_ptr<VCA> vca) vertical_button.set_active_state (Gtkmm2ext::ExplicitActive); } } + +void +VCAMasterStrip::remove () +{ + if (!_session) { + return; + } + + _session->vca_manager().remove_vca (_vca); +} |