summaryrefslogtreecommitdiff
path: root/muse2/muse/arranger/pcanvas.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-11-07 21:43:20 +0000
committerFlorian Jung <flo@windfisch.org>2011-11-07 21:43:20 +0000
commit720a43f55f893c1472be0f859d224401f1ec73be (patch)
treed1876120c5e8892e0c8b2b8d023169f1013d2b11 /muse2/muse/arranger/pcanvas.cpp
parentbce73374a78f5fdcc7cc776395157564b5ef9be5 (diff)
housekeeping: pulled fixes from release into trunk
Diffstat (limited to 'muse2/muse/arranger/pcanvas.cpp')
-rw-r--r--muse2/muse/arranger/pcanvas.cpp15
1 files changed, 15 insertions, 0 deletions
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);
}