13
0

Tag_reset() should be FromPlug, not FromGui.

This commit is contained in:
Ben Loftis 2018-03-01 18:26:09 -06:00
parent 54d0e1d992
commit 52a2f5bada
3 changed files with 10 additions and 4 deletions

View File

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

View File

@ -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<std::string> get_tags (PluginInfoPtr const&) const;

View File

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