Commit 75ecc33b authored by Craig Watson's avatar Craig Watson

When creating a new page, set the background grid size to the same as

the last active page
parent 00f50c95
......@@ -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);
}
}
......
......@@ -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();
......
......@@ -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()
......
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