From 543dbb22e201208aee602a1c56ab92d8b9adb53f Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Sat, 27 Aug 2011 15:33:32 +0000 Subject: deselecting a part now also deselects the track --- muse2/muse/arranger/pcanvas.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'muse2/muse/arranger/pcanvas.cpp') 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) -- cgit v1.2.3