diff options
author | Florian Jung <flo@windfisch.org> | 2011-08-27 15:33:32 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2011-08-27 15:33:32 +0000 |
commit | 543dbb22e201208aee602a1c56ab92d8b9adb53f (patch) | |
tree | 61ed8cf3d0103c9dea69f9e6c38de73e0e6ad3b0 /muse2/muse/arranger/pcanvas.cpp | |
parent | 7cd849e0402ab587958d45b295a3a385a7ab3c0e (diff) |
deselecting a part now also deselects the track
Diffstat (limited to 'muse2/muse/arranger/pcanvas.cpp')
-rw-r--r-- | muse2/muse/arranger/pcanvas.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index cf376042..56d68ceb 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -828,25 +828,29 @@ void PartCanvas::mousePress(QMouseEvent* event) } QPoint pt = event->pos(); CItem* item = items.find(pt); - if (item == 0 && _tool!=AutomationTool) - return; + switch (_tool) { default: - emit trackChanged(item->part()->track()); + if (item) + emit trackChanged(item->part()->track()); + else + emit trackChanged(NULL); break; case CutTool: - splitItem(item, pt); + if (item) splitItem(item, pt); break; case GlueTool: - glueItem(item); + if (item) glueItem(item); break; case MuteTool: { - NPart* np = (NPart*) item; - Part* p = np->part(); - p->setMute(!p->mute()); - redraw(); - break; + if (item) { + NPart* np = (NPart*) item; + Part* p = np->part(); + p->setMute(!p->mute()); + redraw(); + break; + } } case AutomationTool: if (automation.controllerState != doNothing) |