Properly emit Plugin::DropReferences (2/2)
This also destroys the shadow plugin used for analysis as soon as the analysis pane is hidden.
This commit is contained in:
parent
7ab664d5a4
commit
0f7850b0b7
@ -160,6 +160,7 @@ PluginEqGui::PluginEqGui (boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
|
||||
|
||||
PluginEqGui::~PluginEqGui ()
|
||||
{
|
||||
stop_updating ();
|
||||
stop_listening ();
|
||||
|
||||
if (_analysis_scale_surface) {
|
||||
@ -201,13 +202,18 @@ void
|
||||
PluginEqGui::stop_listening ()
|
||||
{
|
||||
analysis_connection.disconnect ();
|
||||
_plugin->deactivate ();
|
||||
if (_plugin) {
|
||||
_plugin->deactivate ();
|
||||
_plugin->drop_references ();
|
||||
_plugin = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PluginEqGui::on_hide ()
|
||||
{
|
||||
stop_updating ();
|
||||
stop_listening ();
|
||||
Gtk::Table::on_hide ();
|
||||
}
|
||||
|
||||
@ -234,6 +240,7 @@ PluginEqGui::on_show ()
|
||||
Gtk::Table::on_show ();
|
||||
|
||||
start_updating ();
|
||||
start_listening ();
|
||||
|
||||
Gtk::Widget *toplevel = get_toplevel ();
|
||||
if (toplevel) {
|
||||
|
@ -48,9 +48,6 @@ public:
|
||||
PluginEqGui (boost::shared_ptr<ARDOUR::PluginInsert>);
|
||||
~PluginEqGui ();
|
||||
|
||||
void start_listening ();
|
||||
void stop_listening ();
|
||||
|
||||
private:
|
||||
// Setup
|
||||
void set_buffer_size (uint32_t, uint32_t);
|
||||
@ -68,6 +65,9 @@ private:
|
||||
void stop_updating ();
|
||||
void start_updating ();
|
||||
|
||||
void start_listening ();
|
||||
void stop_listening ();
|
||||
|
||||
void resize_analysis_area (Gtk::Allocation&);
|
||||
void redraw_analysis_area ();
|
||||
|
||||
|
@ -891,7 +891,6 @@ PlugUIBase::toggle_plugin_analysis()
|
||||
|
||||
plugin_analysis_expander.add (*eqgui);
|
||||
plugin_analysis_expander.show_all ();
|
||||
eqgui->start_listening ();
|
||||
}
|
||||
|
||||
if (!plugin_analysis_expander.get_expanded()) {
|
||||
@ -899,7 +898,6 @@ PlugUIBase::toggle_plugin_analysis()
|
||||
const int child_height = plugin_analysis_expander.get_child ()->get_height ();
|
||||
|
||||
eqgui->hide ();
|
||||
eqgui->stop_listening ();
|
||||
plugin_analysis_expander.remove();
|
||||
|
||||
Gtk::Window *toplevel = (Gtk::Window*) plugin_analysis_expander.get_ancestor (GTK_TYPE_WINDOW);
|
||||
|
Loading…
Reference in New Issue
Block a user