diff options
author | Robin Gareus <robin@gareus.org> | 2019-05-25 00:14:50 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-05-25 00:14:56 +0200 |
commit | a0b5616c85f25d0f6759c7cc80cc1adb68ef9a22 (patch) | |
tree | f44a98935a373bd56310dad2aaf0386c606c4eff /gtk2_ardour/plugin_selector.cc | |
parent | 92cfed14cf3ab5cdf2d0f5b0c5d8662aaeb73c5c (diff) |
Speed up Plugin status changes
Postpone menu rebuild when plugin status changes while the PluginManager
Dialog is visible.
Since the dialog is modal, the menus cannot be used while the dialog
is visible, so updating them once when the dialog is hidden is sufficient.
Diffstat (limited to 'gtk2_ardour/plugin_selector.cc')
-rw-r--r-- | gtk2_ardour/plugin_selector.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index 338d3aa9ee..a06e24893a 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -61,6 +61,9 @@ PluginSelector::PluginSelector (PluginManager& mgr) : ArdourDialog (_("Plugin Manager"), true, false) , search_clear_button (Stock::CLEAR) , manager (mgr) + , _need_tag_save (false) + , _need_status_save (false) + , _need_menu_rebuild (false) , _inhibit_refill (false) { set_name ("PluginSelectorWindow"); @@ -786,6 +789,9 @@ PluginSelector::run () if (_need_status_save) { manager.save_statuses(); } + if (_need_menu_rebuild) { + build_plugin_menu (); + } return (int) r; } @@ -929,6 +935,11 @@ PluginSelector::plugin_menu() void PluginSelector::build_plugin_menu () { + if (is_visible ()) { + _need_menu_rebuild = true; + return; + } + _need_menu_rebuild = false; PluginInfoList all_plugs; all_plugs.insert (all_plugs.end(), manager.ladspa_plugin_info().begin(), manager.ladspa_plugin_info().end()); |