From 3cd2ad85af94efef65af3055d0a243f83b074f97 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 7 Apr 2020 14:16:53 +0200 Subject: [PATCH] Fix restoring custom MIDNAM #7984 --- gtk2_ardour/midi_time_axis.cc | 6 +++--- 1 file 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) {