From a666429d12833c702d71baac1fbb5487844cf442 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 13 Nov 2019 23:00:12 +0100 Subject: Fix MIDNAM device list for plugin-provided names --- gtk2_ardour/midi_time_axis.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour') 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 (); + } } } -- cgit v1.2.3