Further defer changes of plugin Tags+Status, and consolidate code to call PluginListChanged only once.

This commit is contained in:
Ben Loftis 2018-02-02 19:25:01 -06:00
parent 3aacdd79ae
commit b69d818ce9
6 changed files with 30 additions and 39 deletions

View file

@ -97,13 +97,14 @@ public:
};
std::vector<std::string> get_all_tags (enum TagFilter) const;
/** plugins were added to or removed from one of the PluginInfoLists */
/** plugins were added to or removed from one of the PluginInfoLists, OR the user has made changes to the status/tags */
PBD::Signal0<void> PluginListChanged;
/** Plugin Hidden/Favorite status changed */
PBD::Signal3<void, ARDOUR::PluginType, std::string, PluginStatusType> PluginStatusesChanged; //PluginType t, string id, string tag
/** A single plugin's Hidden/Favorite status changed */
PBD::Signal3<void, ARDOUR::PluginType, std::string, PluginStatusType> PluginStatusChanged; //PluginType t, string id, string tag
PBD::Signal3<void, ARDOUR::PluginType, std::string, std::string> PluginTagsChanged; //PluginType t, string id, string tag
/** A single plugin's Tags status changed */
PBD::Signal3<void, ARDOUR::PluginType, std::string, std::string> PluginTagChanged; //PluginType t, string id, string tag
private:

View file

@ -1474,7 +1474,7 @@ PluginManager::set_status (PluginType t, string id, PluginStatusType status)
statuses.insert (ps);
}
PluginStatusesChanged (t, id, status); /* EMIT SIGNAL */
PluginStatusChanged (t, id, status); /* EMIT SIGNAL */
}
PluginType
@ -1612,7 +1612,7 @@ PluginManager::set_tags (PluginType t, string id, string tag, bool factory, bool
ptags.insert (ps);
}
if (!factory || force) {
PluginTagsChanged (t, id, sanitized); /* EMIT SIGNAL */
PluginTagChanged (t, id, sanitized); /* EMIT SIGNAL */
}
}