From da15b599de110fa43b97b92bbb772410f4462f0f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 31 Mar 2019 22:25:29 +0200 Subject: [PATCH] Remove a hack of using flags to emit a signal-change from the GUI The GUI should not be calling `manager.PluginListChanged();` It's up to the plugin-manager to emit relevant signals. This fixes an issue when adding/removing plugin-favorites using the mixer's sidebar or via remote-control/surfaces or script. --- gtk2_ardour/plugin_selector.cc | 12 +----------- gtk2_ardour/plugin_selector.h | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index 7b599bc25d..338d3aa9ee 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -69,10 +69,9 @@ PluginSelector::PluginSelector (PluginManager& mgr) _plugin_menu = 0; in_row_change = false; - //anytime the list changes ( Status, Tags, or scanned plugins ) we need to rebuild redirect-box plugin selector menu manager.PluginListChanged.connect (plugin_list_changed_connection, invalidator (*this), boost::bind (&PluginSelector::build_plugin_menu, this), gui_context()); + manager.PluginStatusChanged.connect (plugin_list_changed_connection, invalidator (*this), boost::bind (&PluginSelector::build_plugin_menu, this), gui_context()); - //these are used to update the info of specific entries, while they are being edited manager.PluginStatusChanged.connect (plugin_list_changed_connection, invalidator (*this), boost::bind (&PluginSelector::plugin_status_changed, this, _1, _2, _3), gui_context()); manager.PluginTagChanged.connect(plugin_list_changed_connection, invalidator (*this), boost::bind (&PluginSelector::tags_changed, this, _1, _2, _3), gui_context()); @@ -788,10 +787,6 @@ PluginSelector::run () manager.save_statuses(); } - if ( _need_tag_save || _need_status_save || _need_menu_rebuild ) { - manager.PluginListChanged(); //emit signal - } - return (int) r; } @@ -810,7 +805,6 @@ PluginSelector::tag_reset_button_clicked () manager.reset_tags (pi); display_selection_changed (); _need_tag_save = true; - _need_menu_rebuild = true; } } @@ -833,7 +827,6 @@ PluginSelector::tag_entry_changed () manager.set_tags (pi->type, pi->unique_id, tag_entry->get_text(), pi->name, PluginManager::FromGui); _need_tag_save = true; - _need_menu_rebuild = true; } } @@ -888,7 +881,6 @@ PluginSelector::on_show () _need_tag_save = false; _need_status_save = false; - _need_menu_rebuild = false; } struct PluginMenuCompareByCreator { @@ -1172,7 +1164,6 @@ PluginSelector::favorite_changed (const std::string& path) manager.set_status (pi->type, pi->unique_id, status); _need_status_save = true; - _need_menu_rebuild = true; } in_row_change = false; } @@ -1205,7 +1196,6 @@ PluginSelector::hidden_changed (const std::string& path) manager.set_status (pi->type, pi->unique_id, status); _need_status_save = true; - _need_menu_rebuild = true; } in_row_change = false; } diff --git a/gtk2_ardour/plugin_selector.h b/gtk2_ardour/plugin_selector.h index fda03c10f3..ba09b08f7f 100644 --- a/gtk2_ardour/plugin_selector.h +++ b/gtk2_ardour/plugin_selector.h @@ -186,7 +186,6 @@ private: bool _need_tag_save; bool _need_status_save; - bool _need_menu_rebuild; bool _inhibit_refill; };