Propagate MIDNAM selection to Route

Most of Ardour's GUI queries route->instrument_info() for MIDNAM.
This is a minimal invasive hotfix to update the PatchChange
dialog and patch-names on the timeline when the MIDNAM selection
changes.

This got lost in de74cca6b8.
This commit is contained in:
Robin Gareus 2020-04-01 00:51:01 +02:00
parent 1aae553dae
commit 370f7bb30f
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -513,6 +513,13 @@ MidiTimeAxisView::model_changed (const std::string& m)
_midnam_custom_device_mode_selector.hide();
}
/* inform the backend, route owned instrument info */
if (device_modes.size() > 0) {
_route->instrument_info().set_external_instrument (model, device_modes.front());
} else {
_route->instrument_info().set_external_instrument (model, "");
}
// Rebuild controller menu
_controller_menu_map.clear ();
delete controller_menu;
@ -531,6 +538,7 @@ MidiTimeAxisView::custom_device_mode_changed(const std::string& mode)
set_gui_property (X_("midnam-custom-device-mode"), mode);
_midnam_custom_device_mode_selector.set_text (mode);
/* inform the backend, route owned instrument info */
_route->instrument_info().set_external_instrument (model, mode);
}