From 9db221f60f1624418e350eeb3e44e8780e2af49a Mon Sep 17 00:00:00 2001 From: Aleksei Kanash Date: Wed, 15 Feb 2012 19:11:36 +0200 Subject: [PATCH] Fix to SANKORE-516. --- src/core/UBApplication.cpp | 3 +++ src/core/UBApplicationController.cpp | 2 ++ src/core/UBSettings.cpp | 1 + src/core/UBSettings.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/core/UBApplication.cpp b/src/core/UBApplication.cpp index 784c9473..a1a2d19d 100644 --- a/src/core/UBApplication.cpp +++ b/src/core/UBApplication.cpp @@ -281,6 +281,9 @@ int UBApplication::exec(const QString& pFileToImport) toolBarPositionChanged(UBSettings::settings()->appToolBarPositionedAtTop->get()); + bool bUseMultiScreen = UBSettings::settings()->appUseMultiscreen->get().toBool(); + mainWindow->actionMultiScreen->setChecked(bUseMultiScreen); + applicationController->useMultiScreen(bUseMultiScreen); connect(mainWindow->actionMultiScreen, SIGNAL(triggered(bool)), applicationController, SLOT(useMultiScreen(bool))); connect(mainWindow->actionWidePageSize, SIGNAL(triggered(bool)), boardController, SLOT(setWidePageSize(bool))); connect(mainWindow->actionRegularPageSize, SIGNAL(triggered(bool)), boardController, SLOT(setRegularPageSize(bool))); diff --git a/src/core/UBApplicationController.cpp b/src/core/UBApplicationController.cpp index 926ae03f..5e1f3ac2 100644 --- a/src/core/UBApplicationController.cpp +++ b/src/core/UBApplicationController.cpp @@ -723,6 +723,8 @@ void UBApplicationController::importFile(const QString& pFilePath) void UBApplicationController::useMultiScreen(bool use) { mDisplayManager->setUseMultiScreen(use); + UBSettings::settings()->appUseMultiscreen->set(use); + } diff --git a/src/core/UBSettings.cpp b/src/core/UBSettings.cpp index 8eed4e4e..91a2fd30 100644 --- a/src/core/UBSettings.cpp +++ b/src/core/UBSettings.cpp @@ -210,6 +210,7 @@ void UBSettings::init() appIsInSoftwareUpdateProcess = new UBSetting(this, "App", "IsInSoftwareUpdateProcess", false); appLastSessionDocumentUUID = new UBSetting(this, "App", "LastSessionDocumentUUID", ""); appLastSessionPageIndex = new UBSetting(this, "App", "LastSessionPageIndex", 0); + appUseMultiscreen = new UBSetting(this, "App", "UseMusliscreenMode", true); boardPenFineWidth = new UBSetting(this, "Board", "PenFineWidth", 1.5); boardPenMediumWidth = new UBSetting(this, "Board", "PenMediumWidth", 3.0); diff --git a/src/core/UBSettings.h b/src/core/UBSettings.h index 2a314795..5d115599 100644 --- a/src/core/UBSettings.h +++ b/src/core/UBSettings.h @@ -212,6 +212,8 @@ class UBSettings : public QObject UBSetting* appLastSessionDocumentUUID; UBSetting* appLastSessionPageIndex; + UBSetting* appUseMultiscreen; + UBSetting* boardPenFineWidth; UBSetting* boardPenMediumWidth; UBSetting* boardPenStrongWidth;