From 52a2f5bada673602b8432254286ab17d19a68515 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Thu, 1 Mar 2018 18:26:09 -0600 Subject: [PATCH] Tag_reset() should be FromPlug, not FromGui. --- gtk2_ardour/plugin_selector.cc | 2 +- libs/ardour/ardour/plugin_manager.h | 2 +- libs/ardour/plugin_manager.cc | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index f6573b1f52..9796107f02 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -839,7 +839,7 @@ PluginSelector::tag_reset_button_clicked () if (plugin_display.get_selection()->count_selected_rows() != 0) { TreeModel::Row row = *(plugin_display.get_selection()->get_selected()); ARDOUR::PluginInfoPtr pi = row[plugin_columns.plugin]; - manager.reset_tags (pi, PluginManager::FromGui); + manager.reset_tags (pi); display_selection_changed (); _need_tag_save = true; _need_menu_rebuild = true; diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h index f9b6feb737..a66e2d0674 100644 --- a/libs/ardour/ardour/plugin_manager.h +++ b/libs/ardour/ardour/plugin_manager.h @@ -92,7 +92,7 @@ public: FromGui // ... from the UI, in realtime: will emit a signal so ui can show "sanitized" string as it is generated }; void set_tags (ARDOUR::PluginType type, std::string unique_id, std::string tags, std::string name, TagType tagtype); - void reset_tags (PluginInfoPtr const&, TagType); + void reset_tags (PluginInfoPtr const&); std::string get_tags_as_string (PluginInfoPtr const&) const; std::vector get_tags (PluginInfoPtr const&) const; diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 00a89f2d79..9713a241e2 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -1622,9 +1622,15 @@ PluginManager::set_tags (PluginType t, string id, string tag, std::string name, } void -PluginManager::reset_tags (PluginInfoPtr const& pi, TagType tt) +PluginManager::reset_tags (PluginInfoPtr const& pi) { - set_tags (pi->type, pi->unique_id, pi->category, pi->name, tt); + PluginTag ps (pi->type, pi->unique_id, pi->category, pi->name, FromPlug); + + PluginTagList::const_iterator i = find (ptags.begin(), ptags.end(), ps); + if (i != ptags.end()) { + ptags.erase (ps); + ptags.insert (ps); + } } std::string