Commit 29fc2f45 authored by Claudio Valerio's avatar Claudio Valerio

better fix

parent 947149ea
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment