From 57f9075550003ca95da288bce43f1d15b9a68136 Mon Sep 17 00:00:00 2001 From: Anatoly Mihalchenko Date: Mon, 19 Mar 2012 18:47:32 +0300 Subject: [PATCH] SANKORE-47 (fix for compass component) --- src/board/UBBoardView.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/board/UBBoardView.cpp b/src/board/UBBoardView.cpp index e2f3edb6..ded741dd 100644 --- a/src/board/UBBoardView.cpp +++ b/src/board/UBBoardView.cpp @@ -416,12 +416,15 @@ UBBoardView::mousePressEvent (QMouseEvent *event) } else if (currentTool == UBStylusTool::Selector) { + QSet existingTools = scene()->tools(); + movingItem = scene()->itemAt(this->mapToScene(event->posF().toPoint())); - if (!movingItem || - movingItem->isSelected() || - (movingItem->type() == UBGraphicsDelegateFrame::Type || - movingItem->type() == DelegateButton::Type)) + if (!movingItem + || movingItem->isSelected() + || (movingItem->type() == UBGraphicsDelegateFrame::Type + || movingItem->type() == DelegateButton::Type) + || existingTools.contains(movingItem)) { movingItem = NULL; QGraphicsView::mousePressEvent (event);