tweak detection of correct MIDI patch change when removing the canvas item in a MidiView

This commit is contained in:
Paul Davis
2025-12-11 11:43:34 -07:00
parent aca340b810
commit 78a59db334

View File

@@ -2196,7 +2196,7 @@ MidiView::remove_canvas_patch_change (PatchChange* pc)
{
/* remove the canvas item */
for (PatchChanges::iterator x = _patch_changes.begin(); x != _patch_changes.end(); ++x) {
if (x->second->patch() == pc->patch()) {
if (x->first == pc->patch()) {
_patch_changes.erase (x);
break;
}