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_region_view.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_region_view.cc')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index e16f6873ef..7b9b8acf91 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -4306,16 +4306,9 @@ MidiRegionView::get_note_name (boost::shared_ptr<NoteType> n, uint8_t note_value MidiTimeAxisView* mtv = dynamic_cast<MidiTimeAxisView*>(&trackview); if (mtv) { - boost::shared_ptr<MasterDeviceNames> device_names(mtv->get_device_names()); - if (device_names) { - MIDI::Name::PatchPrimaryKey patch_key; - get_patch_key_at(n->time(), n->channel(), patch_key); - name = device_names->note_name(mtv->gui_property(X_("midnam-custom-device-mode")), - n->channel(), - patch_key.bank(), - patch_key.program(), - note_value); - } + MIDI::Name::PatchPrimaryKey patch_key; + get_patch_key_at (n->time(), n->channel(), patch_key); + name = instrument_info ().get_note_name (patch_key.bank(), patch_key.program(), n->channel(), note_value); } char buf[128]; |