diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index 9ebde9fe..53bef3e1 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/src/adaptors/UBSvgSubsetAdaptor.cpp @@ -466,7 +466,6 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene(UBDocumentProx if (!ubGridSize.isNull()) { int gridSize = ubGridSize.toInt(); - UBSettings::settings()->crossSize = gridSize; mScene->setBackgroundGridSize(gridSize); } } @@ -482,7 +481,6 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene(UBDocumentProx if (!ubGridSize.isNull()) { int gridSize = ubGridSize.toInt(); - UBSettings::settings()->crossSize = gridSize; mScene->setBackgroundGridSize(gridSize); } } diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index 543853b0..f0791119 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.cpp @@ -661,6 +661,7 @@ UBGraphicsScene* UBPersistenceManager::createDocumentSceneAt(UBDocumentProxy* pr newScene->setBackground(UBSettings::settings()->isDarkBackground(), UBSettings::settings()->UBSettings::pageBackground()); + newScene->setBackgroundGridSize(UBSettings::settings()->crossSize); persistDocumentScene(proxy, newScene, index); proxy->incPageCount(); diff --git a/src/gui/UBBackgroundPalette.cpp b/src/gui/UBBackgroundPalette.cpp index d10fcc08..4cb6b3b1 100644 --- a/src/gui/UBBackgroundPalette.cpp +++ b/src/gui/UBBackgroundPalette.cpp @@ -134,6 +134,7 @@ void UBBackgroundPalette::showEvent(QShowEvent* event) void UBBackgroundPalette::sliderValueChanged(int value) { UBApplication::boardController->activeScene()->setBackgroundGridSize(value); + UBSettings::settings()->crossSize = value; // since this function is called (indirectly, by refresh) when we switch scenes, the settings will always have the current scene's cross size. } void UBBackgroundPalette::backgroundChanged()