fixed missing calls to reloadThumbnails in some cases

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent beb4361a72
commit 758bd16da7
  1. 7
      src/board/UBBoardController.cpp
  2. 1
      src/document/UBDocumentController.cpp

@ -1428,12 +1428,15 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QUrl
QStringList fileNames; QStringList fileNames;
fileNames << pdfFile.fileName(); fileNames << pdfFile.fileName();
result = UBDocumentManager::documentManager()->addFilesToDocument(selectedDocument(), fileNames); result = UBDocumentManager::documentManager()->addFilesToDocument(selectedDocument(), fileNames);
emit documentThumbnailsUpdated(this);
pdfFile.close(); pdfFile.close();
} }
} }
if (result){ if (result)
{
if (UBApplication::documentController->selectedDocument() == selectedDocument())
UBApplication::documentController->reloadThumbnails();
selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
} }
} }

@ -3049,6 +3049,7 @@ bool UBDocumentController::addFileToDocument(UBDocumentProxy* document)
{ {
document->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime())); document->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
UBMetadataDcSubsetAdaptor::persist(document); UBMetadataDcSubsetAdaptor::persist(document);
reloadThumbnails();
} }
else else
{ {

Loading…
Cancel
Save