use the full passed-in parameter when dealing with velocity in a pianoroll

The channel matters, and is present in the argument, so don't just pick zero as a stupid
default
This commit is contained in:
Paul Davis 2025-03-14 16:35:41 -06:00
parent a83f28231f
commit 0758ffe6d6

View file

@ -397,13 +397,14 @@ PianorollMidiView::update_automation_display (Evoral::Parameter const & param, S
if (param.type() == MidiVelocityAutomation) {
if (!velocity_display) {
/* Create and add to automation display map */
std::cerr << "Createing velocity_display\n";
velocity_display = new PianorollVelocityDisplay (editing_context(), midi_context(), *this, *automation_group, 0x312244ff);
auto res = automation_map.insert (std::make_pair (Evoral::Parameter (ARDOUR::MidiVelocityAutomation, 0, 0), AutomationDisplayState (*velocity_display, false)));
auto res = automation_map.insert (std::make_pair (param, AutomationDisplayState (*velocity_display, false)));
ads = &((*res.first).second);