don't reload thumbnails everytime documentscenechanged is called + reload after duplicate in Board Mode

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent 141c48e20d
commit 76cfee3dc5
  1. 2
      src/board/UBBoardController.cpp
  2. 10
      src/document/UBDocumentController.cpp

@ -589,8 +589,8 @@ void UBBoardController::duplicateScene(int nIndex)
if (UBApplication::documentController->selectedDocument() == selectedDocument())
{
UBApplication::documentController->insertThumbPage(nIndex);
UBApplication::documentController->reloadThumbnails();
}
//emit documentThumbnailsUpdated(this);
emit addThumbnailRequired(this, nIndex + 1);
selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));

@ -2382,7 +2382,10 @@ void UBDocumentController::duplicateSelectedItem()
if (selectedSceneIndexes.count() > 0)
{
duplicatePages(selectedSceneIndexes);
emit documentThumbnailsUpdated(this);
if (selectedDocument() == selectedDocumentProxy())
{
reloadThumbnails();
}
selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
UBMetadataDcSubsetAdaptor::persist(selectedDocument());
int selectedThumbnail = selectedSceneIndexes.last() + selectedSceneIndexes.size();
@ -3132,11 +3135,6 @@ void UBDocumentController::documentSceneChanged(UBDocumentProxy* proxy, int pSce
{
Q_UNUSED(pSceneIndex);
if (proxy == selectedDocumentProxy())
{
reloadThumbnails();
}
QModelIndexList sel = mDocumentUI->documentTreeView->selectionModel()->selectedRows(0);
QModelIndex selection;

Loading…
Cancel
Save