From 29fc2f45dabbc7ff38e60e08f4f89807cf67db4a Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 11 Sep 2012 15:16:43 +0200 Subject: [PATCH] better fix --- src/core/UBPersistenceManager.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index 10cfe528..6250ff32 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.cpp @@ -587,13 +587,8 @@ UBGraphicsScene* UBPersistenceManager::loadDocumentScene(UBDocumentProxy* proxy, return mSceneCache.value(proxy, sceneIndex); else { UBGraphicsScene* scene = UBSvgSubsetAdaptor::loadScene(proxy, sceneIndex); - // claudio: this is not a good fix but this code has to be reworked if(!scene && UBSettings::settings()->teacherGuidePageZeroActivated->get().toBool()){ - QString fileName = proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", 0); - QFile file(fileName); - if(!file.exists()){ - UBPersistenceManager::persistenceManager()->persistDocumentScene(proxy,new UBGraphicsScene(proxy),0); - } + createDocumentSceneAt(proxy,0); scene = UBSvgSubsetAdaptor::loadScene(proxy, 0); }