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;
fileNames << pdfFile.fileName();
result = UBDocumentManager::documentManager()->addFilesToDocument(selectedDocument(), fileNames);
emit documentThumbnailsUpdated(this);
pdfFile.close();
}
}
if (result){
if (result)
{
if (UBApplication::documentController->selectedDocument() == selectedDocument())
UBApplication::documentController->reloadThumbnails();
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()));
UBMetadataDcSubsetAdaptor::persist(document);
reloadThumbnails();
}
else
{

Loading…
Cancel
Save