revert previous fix + code cleaning

preferencesAboutTextFull
Clément Fauconnier 7 years ago
parent 7954499950
commit 08e7ae8461
  1. 1
      src/board/UBBoardController.cpp
  2. 9
      src/document/UBDocumentContainer.cpp
  3. 1
      src/document/UBDocumentContainer.h
  4. 1
      src/document/UBDocumentController.cpp

@ -1542,7 +1542,6 @@ void UBBoardController::setActiveDocumentScene(UBDocumentProxy* pDocumentProxy,
mActiveSceneIndex = index;
setDocument(pDocumentProxy, forceReload);
emit initThumbnailsRequired(this);
updateSystemScaleFactor();
mControlView->setScene(mActiveScene);

@ -52,6 +52,7 @@ void UBDocumentContainer::setDocument(UBDocumentProxy* document, bool forceReloa
{
mCurrentDocument = document;
emit initThumbnailsRequired(this);
emit documentSet(mCurrentDocument);
reloadThumbnails();
}
@ -103,8 +104,16 @@ void UBDocumentContainer::addPage(int index)
emit addThumbnailRequired(this, index);
}
void UBDocumentContainer::clearThumbPage()
{
qDeleteAll(mDocumentThumbs);
mDocumentThumbs.clear();
}
void UBDocumentContainer::initThumbPage()
{
clearThumbPage();
for (int i=0; i < selectedDocument()->pageCount(); i++)
insertThumbPage(i);
}

@ -53,6 +53,7 @@ class UBDocumentContainer : public QObject
void duplicatePages(QList<int>& pageIndexes);
bool movePageToIndex(int source, int target);
void deletePages(QList<int>& pageIndexes);
void clearThumbPage();
void initThumbPage();
void addPage(int index);
void updatePage(int index);

@ -476,7 +476,6 @@ void UBDocumentController::openSelectedItem()
if (proxy && isOKToOpenDocument(proxy))
{
UBApplication::applicationController->showBoard();
UBApplication::applicationController->showBoard();
}
}
}

Loading…
Cancel
Save