fixed some bad behaviors around thumbnail views and document persistence

preferencesAboutTextFull
Clément Fauconnier 7 years ago
parent 746382ef79
commit 7a9b89694b
  1. 4
      src/board/UBBoardController.cpp
  2. 5
      src/gui/UBBoardThumbnailsView.cpp

@ -1539,10 +1539,10 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy,
mActiveScene = targetScene;
mActiveSceneIndex = index;
persistCurrentScene();
setDocument(pDocumentProxy, forceReload);
persistCurrentScene();
updateSystemScaleFactor();
mControlView->setScene(mActiveScene);

@ -190,7 +190,10 @@ void UBBoardThumbnailsView::mousePressEvent(QMouseEvent *event)
UBDraggableThumbnailView* item = dynamic_cast<UBDraggableThumbnailView*>(itemAt(event->pos()));
if (item)
{
UBApplication::boardController->persistCurrentScene();
UBApplication::boardController->setActiveDocumentScene(item->sceneIndex());
}
QGraphicsView::mousePressEvent(event);
}
@ -202,7 +205,9 @@ void UBBoardThumbnailsView::mouseMoveEvent(QMouseEvent *event)
void UBBoardThumbnailsView::longPressTimeout()
{
if (QApplication::mouseButtons() != Qt::NoButton)
emit mousePressAndHoldEventRequired(mLastPressedMousePos);
mLongPressTimer.stop();
}

Loading…
Cancel
Save