From 370f7bb30f10bb3e79668edd4d118b15bb3d456c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 1 Apr 2020 00:51:01 +0200 Subject: [PATCH] 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. --- gtk2_ardour/midi_time_axis.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc index 8466d1cf2f..b1b987dbc3 100644 --- a/gtk2_ardour/midi_time_axis.cc +++ b/gtk2_ardour/midi_time_axis.cc @@ -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); }