replaced previous workaround on thumbnail views by a fix

preferencesAboutTextFull
Clément Fauconnier 7 years ago
parent a28b58992e
commit 1f9a4858e1
  1. 5
      src/board/UBBoardController.cpp
  2. 3
      src/core/UBPersistenceManager.cpp
  3. 4
      src/gui/UBBoardThumbnailsView.cpp

@ -1592,10 +1592,6 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy,
if (sceneChange)
{
//should not be necessary, but no more time to investigate on it for the moment :
//for some reason, certain thumbnail views are not updating except if we load the document twice....
//the only workaroud I found for the moment..
emit initThumbnailsRequired(this);
emit activeSceneChanged();
}
}
@ -1810,6 +1806,7 @@ void UBBoardController::selectionChanged()
{
updateActionStates();
emit pageSelectionChanged(activeSceneIndex());
emit updateThumbnailsRequired();
}

@ -179,10 +179,11 @@ void UBPersistenceManager::errorString(QString error)
void UBPersistenceManager::onSceneLoaded(QByteArray scene, UBDocumentProxy* proxy, int sceneIndex)
{
Q_UNUSED(scene);
qDebug() << "scene loaded " << sceneIndex;
QTime time;
time.start();
mSceneCache.insert(proxy,sceneIndex,UBSvgSubsetAdaptor::loadScene(proxy,scene));
mSceneCache.insert(proxy, sceneIndex, loadDocumentScene(proxy, sceneIndex));
qDebug() << "millisecond for sceneCache " << time.elapsed();
}

@ -175,6 +175,7 @@ void UBBoardThumbnailsView::updateThumbnailsPos()
}
scene()->setSceneRect(scene()->itemsBoundingRect());
update();
}
void UBBoardThumbnailsView::resizeEvent(QResizeEvent *event)
@ -312,11 +313,12 @@ void UBBoardThumbnailsView::dropEvent(QDropEvent *event)
{
Q_UNUSED(event);
if (mDropSource->sceneIndex() != mDropTarget->sceneIndex())
UBApplication::boardController->moveSceneToIndex(mDropSource->sceneIndex(), mDropTarget->sceneIndex());
mDropSource = NULL;
mDropTarget = NULL;
mDropBar->hide();
update();
updateThumbnailsPos();
}

Loading…
Cancel
Save