From 118581d05229a61094b880b27f666b9f2f68adee Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sun, 22 Sep 2013 03:53:16 +0200 Subject: fixed scoreeditor lasso endless loop --- muse2/muse/midiedit/scoreedit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp index 954cd08a..1cb8e709 100644 --- a/muse2/muse/midiedit/scoreedit.cpp +++ b/muse2/muse/midiedit/scoreedit.cpp @@ -4562,6 +4562,7 @@ set staff_t::parts_at_tick(unsigned tick) void staff_t::apply_lasso(QRect rect, set& already_processed) { + Undo operations; for (ScoreItemList::iterator it=itemlist.begin(); it!=itemlist.end(); it++) for (set::iterator it2=it->second.begin(); it2!=it->second.end(); it2++) if (it2->type==FloItem::NOTE) @@ -4569,10 +4570,11 @@ void staff_t::apply_lasso(QRect rect, set& already_proce if (rect.contains(it2->x, it2->y)) if (already_processed.find(it2->source_event)==already_processed.end()) { - MusEGlobal::song->applyOperation(UndoOp(UndoOp::SelectEvent,*it2->source_event,!it2->source_event->selected(),it2->source_event->selected())); + operations.push_back(UndoOp(UndoOp::SelectEvent,*it2->source_event,!it2->source_event->selected(),it2->source_event->selected())); already_processed.insert(it2->source_event); } } + MusEGlobal::song->applyOperationGroup(operations); } void ScoreCanvas::set_steprec(bool flag) -- cgit v1.2.1