diff options
author | Robin Gareus <robin@gareus.org> | 2019-11-12 06:29:05 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-11-12 06:29:05 +0100 |
commit | a83c6badfe62a06c7c67abd08fafae2244c66361 (patch) | |
tree | 3f44ecfcf34a32cca194c06111fb42fb9be6c26c /gtk2_ardour/midi_time_axis.cc | |
parent | de02201056e16ba732279927323f641dc222d415 (diff) |
Skip custom MIDNAM files in generic MTAV list
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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)); |