fiexed two issues where page count could be corrupted

preferencesAboutTextFull
Clément Fauconnier 4 years ago
parent d613c1257c
commit 0611fafed1
  1. 8
      src/core/UBPersistenceManager.cpp

@ -782,10 +782,10 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
} }
scene->setModified(true); scene->setModified(true);
persistDocumentScene(proxy,scene, index + 1);
proxy->incPageCount(); proxy->incPageCount();
persistDocumentScene(proxy,scene, index + 1);
emit documentSceneCreated(proxy, index + 1); emit documentSceneCreated(proxy, index + 1);
} }
@ -842,10 +842,10 @@ UBGraphicsScene* UBPersistenceManager::createDocumentSceneAt(UBDocumentProxy* pr
newScene->setBackgroundGridSize(UBSettings::settings()->crossSize); newScene->setBackgroundGridSize(UBSettings::settings()->crossSize);
persistDocumentScene(proxy, newScene, index);
proxy->incPageCount(); proxy->incPageCount();
persistDocumentScene(proxy, newScene, index);
emit documentSceneCreated(proxy, index); emit documentSceneCreated(proxy, index);
return newScene; return newScene;

Loading…
Cancel
Save