|
|
|
@ -481,9 +481,9 @@ bool UBBoardView::itemShouldReceiveSuspendedMousePressEvent(QGraphicsItem *item) |
|
|
|
|
case UBGraphicsPixmapItem::Type: |
|
|
|
|
case UBGraphicsTextItem::Type: |
|
|
|
|
case UBGraphicsW3CWidgetItem::Type: |
|
|
|
|
if (currentTool != UBStylusTool::Play && !item->isSelected() && item->parentItem()) |
|
|
|
|
if (currentTool == UBStylusTool::Selector && !item->isSelected() && item->parentItem()) |
|
|
|
|
return true; |
|
|
|
|
if (currentTool != UBStylusTool::Play && !item->isSelected()) |
|
|
|
|
if (currentTool == UBStylusTool::Selector && item->isSelected()) |
|
|
|
|
return true; |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
@ -580,13 +580,22 @@ void UBBoardView::handleItemMousePress(QMouseEvent *event) |
|
|
|
|
if (itemShouldReceiveMousePressEvent(movingItem)) |
|
|
|
|
QGraphicsView::mousePressEvent (event); |
|
|
|
|
else |
|
|
|
|
if (itemShouldReceiveSuspendedMousePressEvent(movingItem)) |
|
|
|
|
{ |
|
|
|
|
if (movingItem) |
|
|
|
|
movingItem->clearFocus(); |
|
|
|
|
|
|
|
|
|
if (suspendedMousePressEvent) |
|
|
|
|
{ |
|
|
|
|
delete suspendedMousePressEvent; |
|
|
|
|
suspendedMousePressEvent = NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (itemShouldReceiveSuspendedMousePressEvent(movingItem)) |
|
|
|
|
{ |
|
|
|
|
suspendedMousePressEvent = new QMouseEvent(event->type(), event->pos(), event->button(), event->buttons(), event->modifiers()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UBBoardView::handleItemMouseMove(QMouseEvent *event) |
|
|
|
|
{ |
|
|
|
@ -933,6 +942,10 @@ UBBoardView::mouseReleaseEvent (QMouseEvent *event) |
|
|
|
|
delete suspendedMousePressEvent; |
|
|
|
|
suspendedMousePressEvent = NULL;
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
movingItem->setSelected(true);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (mUBRubberBand && mUBRubberBand->isVisible()) { |
|
|
|
|