diff options
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)); |