summaryrefslogtreecommitdiff
path: root/gtk2_ardour/midi_time_axis.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-11-13 23:00:12 +0100
committerRobin Gareus <robin@gareus.org>2019-11-13 23:00:55 +0100
commita666429d12833c702d71baac1fbb5487844cf442 (patch)
treed5c1d2a43fc2bb3c3e35d39f83f51140dc9b8868 /gtk2_ardour/midi_time_axis.cc
parent4c9da045841ad8ee529ab222cc3fffd5b85edda6 (diff)
Fix MIDNAM device list for plugin-provided names
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r--gtk2_ardour/midi_time_axis.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index 4893d0caa6..47cbcfac2a 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -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 ();
+ }
}
}