fixed deselect all on autosave

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent 48ffe65b28
commit 5a8b0a1117
  1. 2
      src/board/UBBoardController.cpp
  2. 5
      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 && (mActiveSceneIndex >= 0) && mActiveSceneIndex != mMovingSceneIndex
&& (mActiveScene->isModified())) && (mActiveScene->isModified()))
{ {
UBPersistenceManager::persistenceManager()->persistDocumentScene(selectedDocument(), mActiveScene, mActiveSceneIndex); UBPersistenceManager::persistenceManager()->persistDocumentScene(selectedDocument(), mActiveScene, mActiveSceneIndex, isAnAutomaticBackup);
updatePage(mActiveSceneIndex); updatePage(mActiveSceneIndex);
} }
} }

@ -931,11 +931,12 @@ void UBPersistenceManager::reassignDocProxy(UBDocumentProxy *newDocument, UBDocu
return mSceneCache.reassignDocProxy(newDocument, oldDocument); 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(); checkIfDocumentRepositoryExists();
pScene->deselectAllItems(); if (!isAnAutomaticBackup)
pScene->deselectAllItems();
generatePathIfNeeded(pDocumentProxy); generatePathIfNeeded(pDocumentProxy);

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

Loading…
Cancel
Save