Commit 57f90755 authored by Anatoly Mihalchenko's avatar Anatoly Mihalchenko

SANKORE-47 (fix for compass component)

parent 375e1470
......@@ -416,12 +416,15 @@ UBBoardView::mousePressEvent (QMouseEvent *event)
}
else if (currentTool == UBStylusTool::Selector)
{
QSet<QGraphicsItem*> 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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment