|
|
@ -1083,8 +1083,7 @@ void UBBoardView::mouseMoveEvent (QMouseEvent *event) |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// QTime mouseMoveTime = QTime::currentTime();
|
|
|
|
// QTime mouseMoveTime = QTime::currentTime();
|
|
|
|
if(!mIsDragInProgress |
|
|
|
if(!mIsDragInProgress && ((mapToScene(event->pos()) - mLastPressedMousePos).manhattanLength() < QApplication::startDragDistance())) { |
|
|
|
&& ((mapToScene(event->pos()) - mLastPressedMousePos).manhattanLength() < QApplication::startDragDistance())) { |
|
|
|
|
|
|
|
qDebug() << "mouse move event canceled"; |
|
|
|
qDebug() << "mouse move event canceled"; |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -1098,10 +1097,8 @@ void UBBoardView::mouseMoveEvent (QMouseEvent *event) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ((UBDrawingController::drawingController()->isDrawingTool()) |
|
|
|
if ((UBDrawingController::drawingController()->isDrawingTool()) && !mMouseButtonIsPressed) |
|
|
|
&& !mMouseButtonIsPressed) { |
|
|
|
|
|
|
|
QGraphicsView::mouseMoveEvent(event); |
|
|
|
QGraphicsView::mouseMoveEvent(event); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int currentTool = static_cast<int>(UBDrawingController::drawingController()->stylusTool()); |
|
|
|
int currentTool = static_cast<int>(UBDrawingController::drawingController()->stylusTool()); |
|
|
|
switch (currentTool) { |
|
|
|
switch (currentTool) { |
|
|
@ -1159,6 +1156,9 @@ void UBBoardView::mouseMoveEvent (QMouseEvent *event) |
|
|
|
if (currentTool == UBStylusTool::Selector) { |
|
|
|
if (currentTool == UBStylusTool::Selector) { |
|
|
|
foreach (QGraphicsItem *item, items(bandRect)) { |
|
|
|
foreach (QGraphicsItem *item, items(bandRect)) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(item->type() == UBGraphicsItemType::PolygonItemType && item->parentItem()) |
|
|
|
|
|
|
|
item = item->parentItem(); |
|
|
|
|
|
|
|
|
|
|
|
if (item->type() == UBGraphicsW3CWidgetItem::Type |
|
|
|
if (item->type() == UBGraphicsW3CWidgetItem::Type |
|
|
|
|| item->type() == UBGraphicsPixmapItem::Type |
|
|
|
|| item->type() == UBGraphicsPixmapItem::Type |
|
|
|
|| item->type() == UBGraphicsMediaItem::Type |
|
|
|
|| item->type() == UBGraphicsMediaItem::Type |
|
|
@ -1199,8 +1199,7 @@ void UBBoardView::mouseMoveEvent (QMouseEvent *event) |
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
default: |
|
|
|
if (!mTabletStylusIsPressed && scene()) { |
|
|
|
if (!mTabletStylusIsPressed && scene()) { |
|
|
|
scene()->inputDeviceMove(mapToScene(UBGeometryUtils::pointConstrainedInRect(event->pos(), rect())) |
|
|
|
scene()->inputDeviceMove(mapToScene(UBGeometryUtils::pointConstrainedInRect(event->pos(), rect())) , mMouseButtonIsPressed); |
|
|
|
, mMouseButtonIsPressed); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
event->accept (); |
|
|
|
event->accept (); |
|
|
|
} |
|
|
|
} |
|
|
|