fixed an issue where long time press could be triggered if the 'persist document' operations would take longer than the timeout defined for longPressTimer

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent 74c7b84a5c
commit bd41d79731
  1. 3
      src/gui/UBDocumentNavigator.cpp

@ -333,7 +333,6 @@ void UBDocumentNavigator::mousePressEvent(QMouseEvent *event)
if (!event->isAccepted()) if (!event->isAccepted())
{ {
mLongPressTimer.start();
mLastPressedMousePos = event->pos(); mLastPressedMousePos = event->pos();
mLastClickedThumbnail = clickedThumbnail(mLastPressedMousePos); mLastClickedThumbnail = clickedThumbnail(mLastPressedMousePos);
@ -345,6 +344,8 @@ void UBDocumentNavigator::mousePressEvent(QMouseEvent *event)
UBApplication::boardController->setActiveDocumentScene(mLastClickedThumbnail->sceneIndex()); UBApplication::boardController->setActiveDocumentScene(mLastClickedThumbnail->sceneIndex());
UBApplication::boardController->centerOn(UBApplication::boardController->activeScene()->lastCenter()); UBApplication::boardController->centerOn(UBApplication::boardController->activeScene()->lastCenter());
} }
mLongPressTimer.start();
} }
} }

Loading…
Cancel
Save