r18009 by fschmid - Fixed Bug #11304: Trying to edit master pages in imported PDF results in empty canvas

scribus-commit scribus-commit at lists.scribus.net
Sun Dec 30 09:38:58 UTC 2012


Author: fschmid
Date: Sun Dec 30 09:38:57 2012
New Revision: 18009

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18009
Log:
Fixed Bug #11304: Trying to edit master pages in imported PDF results in empty canvas

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribusdoc.h

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18009&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sun Dec 30 09:38:57 2012
@@ -8717,6 +8717,8 @@
 		storedViewXCoor = view->contentsX();
 		storedViewYCoor = view->contentsY();
 		storedViewScale = view->scale();
+		doc->stored_minCanvasCoordinate = doc->minCanvasCoordinate;
+		doc->stored_maxCanvasCoordinate = doc->maxCanvasCoordinate;
 		view->showSymbolPage(temp);
 		scrActions["pageInsert"]->setEnabled(false);
 		scrActions["pageImport"]->setEnabled(false);
@@ -8778,6 +8780,9 @@
 
 void ScribusMainWindow::editSymbolEnd()
 {
+	doc->minCanvasCoordinate = doc->stored_minCanvasCoordinate;
+	doc->maxCanvasCoordinate = doc->stored_maxCanvasCoordinate;
+	view->setScale(storedViewScale);
 	view->hideSymbolPage();
 	if (m_WasAutoSave)
 	{
@@ -8852,6 +8857,8 @@
 		storedViewXCoor = view->contentsX();
 		storedViewYCoor = view->contentsY();
 		storedViewScale = view->scale();
+		doc->stored_minCanvasCoordinate = doc->minCanvasCoordinate;
+		doc->stored_maxCanvasCoordinate = doc->maxCanvasCoordinate;
 		view->showInlinePage(id);
 		scrActions["pageInsert"]->setEnabled(false);
 		scrActions["pageImport"]->setEnabled(false);
@@ -8898,6 +8905,9 @@
 
 void ScribusMainWindow::editInlineEnd()
 {
+	doc->minCanvasCoordinate = doc->stored_minCanvasCoordinate;
+	doc->maxCanvasCoordinate = doc->stored_maxCanvasCoordinate;
+	view->setScale(storedViewScale);
 	view->hideInlinePage();
 	if (m_WasAutoSave)
 	{
@@ -8980,6 +8990,8 @@
 	storedViewXCoor = view->contentsX();
 	storedViewYCoor = view->contentsY();
 	storedViewScale = view->scale();
+	doc->stored_minCanvasCoordinate = doc->minCanvasCoordinate;
+	doc->stored_maxCanvasCoordinate = doc->maxCanvasCoordinate;
 
 	pagePalette->startMasterPageMode(temp);
 	if (!pagePalette->isVisible())
@@ -9022,7 +9034,10 @@
 
 void ScribusMainWindow::manageMasterPagesEnd()
 {
+	doc->setLoading(true);
 	view->setScale(storedViewScale);
+	doc->minCanvasCoordinate = doc->stored_minCanvasCoordinate;
+	doc->maxCanvasCoordinate = doc->stored_maxCanvasCoordinate;
 	view->hideMasterPage();
 	if (m_WasAutoSave)
 	{
@@ -9074,6 +9089,7 @@
 	doc->setCurrentPage(doc->DocPages.at(storedPageNum));
 	view->reformPages(false);
 	view->setContentsPos(static_cast<int>(storedViewXCoor * storedViewScale), static_cast<int>(storedViewYCoor * storedViewScale));
+	doc->setLoading(false);
 	view->DrawNew();
 }
 

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18009&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Sun Dec 30 09:38:57 2012
@@ -1223,6 +1223,8 @@
 	/** \brief Minimum and Maximum Points of Document */
 	FPoint minCanvasCoordinate;
 	FPoint maxCanvasCoordinate;
+	FPoint stored_minCanvasCoordinate;
+	FPoint stored_maxCanvasCoordinate;
 	double rulerXoffset;
 	double rulerYoffset;
 	/** \brief List of Pages */




More information about the scribus-commit mailing list