revert/change part of a666429d12 so that user-selected non-plugin MIDNAM model names are still shown (they were already used)

This commit is contained in:
Paul Davis 2020-02-05 12:48:57 -07:00
parent be45193f3f
commit ee43db8b54

View File

@ -430,11 +430,12 @@ MidiTimeAxisView::update_patch_selector ()
if (pi && pi->plugin ()->has_midnam ()) {
std::string model_name = pi->plugin ()->midnam_model ();
if (gui_property (X_("midnam-model-name")) != model_name) {
/* ensure that "Plugin Provided" is prefixed at the top of the list */
if (_midnam_model_selector.items().empty () || _midnam_model_selector.items().begin()->get_label() != _("Plugin Provided")) {
setup_midnam_patches ();
}
model_changed (model_name);
/* user changed the MIDNAM model to something
other than the plugin provided one. We
should use that, and not the "plugin
provided" label.
*/
model_changed (gui_property (X_("midnam-model-name")));
}
}
}