diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-07 14:16:53 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-07 14:16:53 +0200 |
commit | 3cd2ad85af94efef65af3055d0a243f83b074f97 (patch) | |
tree | 947dd4c0c34440055d080dd7ad543af07acb2e34 /gtk2_ardour/midi_time_axis.cc | |
parent | 4420f9502662253b3c25a2df246c4dc0dac2ab50 (diff) |
Fix restoring custom MIDNAM #7984
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 6604a923a9..c3dc4f7ad7 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -423,8 +423,8 @@ MidiTimeAxisView::setup_midnam_patches () if (model.empty() && _route->instrument_info().have_custom_plugin_info ()) { /* use plugin's MIDNAM */ model_changed (""); - } else if (!_route->instrument_info().master_device_names()) { - /* switch to use default */ + } else if (model.empty() || ! MIDI::Name::MidiPatchManager::instance ().master_device_by_model (model)) { + /* invalid model, switch to use default */ model_changed (""); } else { model_changed (model); @@ -470,7 +470,7 @@ MidiTimeAxisView::model_changed (const std::string& m) } /* set new mode */ - const std::string current_mode = gui_property (X_("midname-custom-device-mode")); + const std::string current_mode = gui_property (X_("midnam-custom-device-mode")); std::string mode; if (find (device_modes.begin(), device_modes.end(), current_mode) == device_modes.end()) { if (device_modes.size() > 0) { |