13
0

Fix MIDNAM device list for plugin-provided names

This commit is contained in:
Robin Gareus 2019-11-13 23:00:12 +01:00
parent 4c9da04584
commit a666429d12
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -426,6 +426,10 @@ 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);
}
}
@ -436,7 +440,9 @@ MidiTimeAxisView::update_patch_selector ()
_midnam_custom_device_mode_selector.hide ();
} else {
_midnam_model_selector.show ();
_midnam_custom_device_mode_selector.show ();
if (_midnam_custom_device_mode_selector.items().size() > 1) {
_midnam_custom_device_mode_selector.show ();
}
}
}