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

the last active page
preferencesAboutTextFull
Craig Watson 7 years ago
parent 00f50c953c
commit 75ecc33bcf
  1. 2
      src/adaptors/UBSvgSubsetAdaptor.cpp
  2. 1
      src/core/UBPersistenceManager.cpp
  3. 1
      src/gui/UBBackgroundPalette.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);
}
}

@ -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()

Loading…
Cancel
Save