diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-01 06:58:00 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-01 16:33:40 +0200 |
commit | 8d28115ec78e011af2fab5c9849fbf9e09ea4786 (patch) | |
tree | 3e5490527239494feadc241f06e1abf65f00ecf4 /gtk2_ardour/midi_automation_line.cc | |
parent | 3b77472ac0634f77a938c34c60e2b66804eee94c (diff) |
Update MIDNAM handling in GUI
* Always use InstrumentInfo for lookups.
Remove name lookups that directly used gui_property()
* Use set/get_gui_property() only to save/restore state,
push custom selection to InstrumentInfo.
* Only store custom selection, use unset for "default"
default = plugin-provided (if available) otherwise general-midi
Diffstat (limited to 'gtk2_ardour/midi_automation_line.cc')
-rw-r--r-- | gtk2_ardour/midi_automation_line.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gtk2_ardour/midi_automation_line.cc b/gtk2_ardour/midi_automation_line.cc index d64deee424..73620abf2a 100644 --- a/gtk2_ardour/midi_automation_line.cc +++ b/gtk2_ardour/midi_automation_line.cc @@ -66,16 +66,9 @@ MidiAutomationLine::get_verbose_cursor_string (double fraction) const return AutomationLine::get_verbose_cursor_string(fraction); } - boost::shared_ptr<MasterDeviceNames> device_names(mtv->get_device_names()); - if (!device_names) { - return AutomationLine::get_verbose_cursor_string(fraction); - } - - const std::string& device_mode = mtv->gui_property(X_("midnam-custom-device-mode")); - const uint8_t channel = mtv->get_channel_for_add(); + const uint8_t channel = mtv->get_channel_for_add(); + boost::shared_ptr<const ValueNameList> value_names = mtv->route()->instrument_info().value_name_list_by_control (channel, _parameter.id()); - boost::shared_ptr<const ValueNameList> value_names = device_names->value_name_list_by_control( - device_mode, channel, _parameter.id()); if (!value_names) { return AutomationLine::get_verbose_cursor_string(fraction); } |