From 720a43f55f893c1472be0f859d224401f1ec73be Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Mon, 7 Nov 2011 21:43:20 +0000 Subject: housekeeping: pulled fixes from release into trunk --- muse2/muse/arranger/pcanvas.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'muse2/muse/arranger/pcanvas.cpp') diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index 5a6e986d..366766ae 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -430,6 +430,13 @@ QPoint PartCanvas::raster(const QPoint& p) const return QPoint(x, y); } + +void PartCanvas::songIsClearing() +{ + curItem=NULL; + items.clearDelete(); +} + //--------------------------------------------------------- // partsChanged //--------------------------------------------------------- @@ -437,6 +444,10 @@ QPoint PartCanvas::raster(const QPoint& p) const void PartCanvas::partsChanged() { //items.clear(); + int sn = -1; + if (curItem) sn=curItem->part()->sn(); + curItem=NULL; + items.clearDelete(); for (MusECore::iTrack t = tracks->begin(); t != tracks->end(); ++t) { MusECore::PartList* pl = (*t)->parts(); @@ -444,6 +455,10 @@ void PartCanvas::partsChanged() MusECore::Part* part = i->second; NPart* np = new NPart(part); items.add(np); + + if (np->part()->sn() == sn) + curItem=np; + if (i->second->selected()) { selectItem(np, true); } -- cgit v1.2.3