fixed an issue where metadata was not updated correctly in some cases of a page deletion

preferencesAboutTextFull
Clément Fauconnier 4 years ago
parent ab705d282e
commit d91e92780c
  1. 1
      src/board/UBBoardController.cpp
  2. 4
      src/core/UBPersistenceManager.cpp

@ -780,6 +780,7 @@ void UBBoardController::deleteScene(int nIndex)
scIndexes << nIndex;
deletePages(scIndexes);
selectedDocument()->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
UBMetadataDcSubsetAdaptor::persist(selectedDocument());
if (nIndex >= pageCount())
nIndex = pageCount()-1;

@ -867,12 +867,12 @@ void UBPersistenceManager::insertDocumentSceneAt(UBDocumentProxy* proxy, UBGraph
mSceneCache.insert(proxy, index, scene);
proxy->incPageCount();
if (persist) {
persistDocumentScene(proxy, scene, index);
}
proxy->incPageCount();
emit documentSceneCreated(proxy, index);
}

Loading…
Cancel
Save