From a83c6badfe62a06c7c67abd08fafae2244c66361 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 12 Nov 2019 06:29:05 +0100 Subject: [PATCH] Skip custom MIDNAM files in generic MTAV list --- gtk2_ardour/midi_time_axis.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 81afba7531..cd51053bba 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -374,6 +374,11 @@ MidiTimeAxisView::setup_midnam_patches () // Build manufacturer submenu for (MIDI::Name::MIDINameDocument::MasterDeviceNamesList::const_iterator n = m->second.begin(); n != m->second.end(); ++n) { + + if (patch_manager.is_custom_model (n->first)) { + continue; + } + Menu_Helpers::MenuElem elem = Gtk::Menu_Helpers::MenuElem( n->first.c_str(), sigc::bind(sigc::mem_fun(*this, &MidiTimeAxisView::model_changed), @@ -381,6 +386,10 @@ MidiTimeAxisView::setup_midnam_patches () items.push_back(elem); } + if (items.empty ()) { + delete menu; + continue; + } // Add manufacturer submenu to selector _midnam_model_selector.AddMenuElem(Menu_Helpers::MenuElem(m->first, *menu));