summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2013-09-22 03:53:16 +0200
committerFlorian Jung <flo@windfisch.org>2013-09-22 03:53:16 +0200
commit118581d05229a61094b880b27f666b9f2f68adee (patch)
tree5769d60a444765b228f916ab6cced6cdd53ddb74
parent93ec519ca799393fd2499097923d54af747f48c4 (diff)
fixed scoreeditor lasso endless loop
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp4
1 files changed, 3 insertions, 1 deletions
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<const MusECore::Part*> staff_t::parts_at_tick(unsigned tick)
void staff_t::apply_lasso(QRect rect, set<const MusECore::Event*>& already_processed)
{
+ Undo operations;
for (ScoreItemList::iterator it=itemlist.begin(); it!=itemlist.end(); it++)
for (set<FloItem>::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<const MusECore::Event*>& 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)