r18030 by fschmid - Follow up to fix for Bug #11152, enter Masterpage Mode with correct parameters.

scribus-commit scribus-commit at lists.scribus.net
Tue Jan 1 10:37:00 UTC 2013


Author: fschmid
Date: Tue Jan  1 10:37:00 2013
New Revision: 18030

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18030
Log:
Follow up to fix for Bug #11152, enter Masterpage Mode with correct parameters.

Modified:
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18030&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Jan  1 10:37:00 2013
@@ -8964,7 +8964,11 @@
 {
 	if (!HaveDoc)
 		return;
-
+	QString mpName = "";
+	if (temp.isEmpty())
+		mpName = doc->currentPage()->MPageNam;
+	else
+		mpName = temp;
 	view->Deselect(true);
 	m_WasAutoSave = doc->autoSave();
 	if (m_WasAutoSave)
@@ -8975,7 +8979,7 @@
 
 	if (doc->masterPageMode())
 	{
-		pagePalette->startMasterPageMode(temp);
+		pagePalette->startMasterPageMode(mpName);
 		return;
 	}
 
@@ -8986,7 +8990,7 @@
 	doc->stored_minCanvasCoordinate = doc->minCanvasCoordinate;
 	doc->stored_maxCanvasCoordinate = doc->maxCanvasCoordinate;
 
-	pagePalette->startMasterPageMode(temp);
+	pagePalette->startMasterPageMode(mpName);
 	if (!pagePalette->isVisible())
 	{
 		pagePalette->show();
@@ -9027,7 +9031,6 @@
 
 void ScribusMainWindow::manageMasterPagesEnd()
 {
-	doc->setLoading(true);
 	view->setScale(storedViewScale);
 	doc->minCanvasCoordinate = doc->stored_minCanvasCoordinate;
 	doc->maxCanvasCoordinate = doc->stored_maxCanvasCoordinate;
@@ -9080,6 +9083,9 @@
 	pagePalette->endMasterPageMode();
 
 	doc->setCurrentPage(doc->DocPages.at(storedPageNum));
+	doc->minCanvasCoordinate = doc->stored_minCanvasCoordinate;
+	doc->maxCanvasCoordinate = doc->stored_maxCanvasCoordinate;
+	doc->setLoading(true);
 	view->reformPages(false);
 	view->setContentsPos(static_cast<int>(storedViewXCoor * storedViewScale), static_cast<int>(storedViewYCoor * storedViewScale));
 	doc->setLoading(false);




More information about the scribus-commit mailing list