make VCA delete button work

This commit is contained in:
Paul Davis 2016-04-29 11:07:57 -04:00
parent 0ab10bf8e3
commit bae9474e9f
2 changed files with 7 additions and 3 deletions

View file

@ -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

View file

@ -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;