fixed deselect all on autosave

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent 48ffe65b28
commit 5a8b0a1117
  1. 2
      src/board/UBBoardController.cpp
  2. 3
      src/core/UBPersistenceManager.cpp
  3. 3
      src/core/UBPersistenceManager.h

@ -2020,7 +2020,7 @@ void UBBoardController::persistCurrentScene(bool isAnAutomaticBackup, bool force
&& (mActiveSceneIndex >= 0) && mActiveSceneIndex != mMovingSceneIndex
&& (mActiveScene->isModified()))
{
UBPersistenceManager::persistenceManager()->persistDocumentScene(selectedDocument(), mActiveScene, mActiveSceneIndex);
UBPersistenceManager::persistenceManager()->persistDocumentScene(selectedDocument(), mActiveScene, mActiveSceneIndex, isAnAutomaticBackup);
updatePage(mActiveSceneIndex);
}
}

@ -931,10 +931,11 @@ void UBPersistenceManager::reassignDocProxy(UBDocumentProxy *newDocument, UBDocu
return mSceneCache.reassignDocProxy(newDocument, oldDocument);
}
void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy, UBGraphicsScene* pScene, const int pSceneIndex)
void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy, UBGraphicsScene* pScene, const int pSceneIndex, bool isAnAutomaticBackup)
{
checkIfDocumentRepositoryExists();
if (!isAnAutomaticBackup)
pScene->deselectAllItems();
generatePathIfNeeded(pDocumentProxy);

@ -103,8 +103,7 @@ class UBPersistenceManager : public QObject
virtual void copyDocumentScene(UBDocumentProxy *from, int fromIndex, UBDocumentProxy *to, int toIndex);
virtual void persistDocumentScene(UBDocumentProxy* pDocumentProxy,
UBGraphicsScene* pScene, const int pSceneIndex);
virtual void persistDocumentScene(UBDocumentProxy* pDocumentProxy, UBGraphicsScene* pScene, const int pSceneIndex, bool isAnAutomaticBackup = false);
virtual UBGraphicsScene* createDocumentSceneAt(UBDocumentProxy* pDocumentProxy, int index, bool useUndoRedoStack = true);

Loading…
Cancel
Save