diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-01 00:51:01 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-01 00:53:27 +0200 |
commit | 370f7bb30f10bb3e79668edd4d118b15bb3d456c (patch) | |
tree | 9e78c3ce8167e41cf356d31ddba724491785d7af /gtk2_ardour/midi_time_axis.cc | |
parent | 1aae553daec91a777656bb2cef687556c79b44c6 (diff) |
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.
Diffstat (limited to 'gtk2_ardour/midi_time_axis.cc')
-rw-r--r-- | gtk2_ardour/midi_time_axis.cc | 8 |
1 files changed, 8 insertions, 0 deletions
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); } |