QGraphicsView::mouseMoveEvent should be called if tool is selector or play but mouse not pressed

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent aa558673e4
commit 4c95514a1a
  1. 10
      src/board/UBBoardView.cpp

@ -848,6 +848,13 @@ void UBBoardView::handleItemMouseMove(QMouseEvent *event)
QGraphicsView::mouseMoveEvent (event); QGraphicsView::mouseMoveEvent (event);
posAfterMove = getMovingItem()->pos(); posAfterMove = getMovingItem()->pos();
} }
else
{
if (!mMouseButtonIsPressed)
{
QGraphicsView::mouseMoveEvent(event);
}
}
mWidgetMoved = ((posAfterMove-posBeforeMove).manhattanLength() != 0); mWidgetMoved = ((posAfterMove-posBeforeMove).manhattanLength() != 0);
@ -1134,9 +1141,6 @@ void UBBoardView::mouseMoveEvent (QMouseEvent *event)
return; return;
} }
if ((UBDrawingController::drawingController()->isDrawingTool()) && !mMouseButtonIsPressed)
QGraphicsView::mouseMoveEvent(event);
int currentTool = static_cast<int>(UBDrawingController::drawingController()->stylusTool()); int currentTool = static_cast<int>(UBDrawingController::drawingController()->stylusTool());
switch (currentTool) { switch (currentTool) {

Loading…
Cancel
Save