13
0

fix crash in ghostregions after adding notes but not invalidating optimization iter (#9452)

This commit is contained in:
Paul Davis 2023-09-21 16:26:22 -06:00
parent 0633254820
commit c642611fe8
2 changed files with 2 additions and 0 deletions

View File

@ -333,6 +333,7 @@ MidiGhostRegion::add_note (NoteBase* n)
{
GhostEvent* event = new GhostEvent (n, _note_group);
events.insert (make_pair (n->note(), event));
_optimization_iterator = events.end();
event->item->set_fill_color (UIConfiguration::instance().color_mod(n->base_color(), "ghost track midi fill"));
event->item->set_outline_color (_outline);

View File

@ -125,6 +125,7 @@ VelocityGhostRegion::add_note (NoteBase* nb)
GhostEvent* event = new GhostEvent (nb, _note_group, l);
events.insert (std::make_pair (nb->note(), event));
_optimization_iterator = events.end();
l->Event.connect (sigc::bind (sigc::mem_fun (*this, &VelocityGhostRegion::lollevent), event));
l->set_ignore_events (true);