r19609 by craig - #12784: Properly (??) enable/disable preview mode menus on doc close/switching

scribus-commit scribus-commit at lists.scribus.net
Wed Oct 22 21:10:25 UTC 2014


Author: craig
Date: Wed Oct 22 21:10:25 2014
New Revision: 19609

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19609
Log:
#12784: Properly (??) enable/disable preview mode menus on doc close/switching

Modified:
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19609&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Wed Oct 22 21:10:25 2014
@@ -2430,6 +2430,7 @@
 		scrActions["viewPreviewMode"]->blockSignals(true);
 		scrActions["viewPreviewMode"]->setChecked(doc->drawAsPreview);
 		scrActions["viewPreviewMode"]->blockSignals(false);
+		appModeHelper->setPreviewMode(doc->drawAsPreview);
 		scrActions["viewEditInPreview"]->setEnabled(doc->drawAsPreview);
 		scrActions["viewToggleCMS"]->blockSignals(true);
 		scrActions["viewToggleCMS"]->setChecked(doc->HasCMS);
@@ -4154,10 +4155,7 @@
 	ScribusWin* tw = ActWin;
 	mdiArea->closeActiveSubWindow();
 	windowsMenuAboutToShow();
-	if (tw == ActWin)
-		return false;
-	else
-		return true;
+	return (tw != ActWin);
 }
 
 bool ScribusMainWindow::DoFileClose()
@@ -4249,6 +4247,9 @@
 	updateLayerMenu();
 	updateTableMenuActions();
 	rebuildScrapbookMenu();
+	//not running view's togglePreview as we dont want to affect the doc settings.
+	scrActions["viewPreviewMode"]->setChecked(false);
+	appModeHelper->setPreviewMode(false);
 	return true;
 }
 




More information about the scribus-commit mailing list