Skip custom MIDNAM files in generic MTAV list

This commit is contained in:
Robin Gareus 2019-11-12 06:29:05 +01:00
parent de02201056
commit a83c6badfe
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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));