r23605 by jghali - Fix issue where items would be deleted from page when converting a page to masterpage

scribus-commit scribus-commit at lists.scribus.net
Mon Apr 13 14:37:41 UTC 2020


Author: jghali
Date: Mon Apr 13 14:37:41 2020
New Revision: 23605

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23605
Log:
Fix issue where items would be deleted from page when converting a page to masterpage

Modified:
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23605&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Mon Apr 13 14:37:41 2020
@@ -4368,7 +4368,6 @@
 	pat.xoffset = attrs.valueAsDouble("xoffset", 0.0);
 	pat.yoffset = attrs.valueAsDouble("yoffset", 0.0);
 
-	int itemCount1 = m_Doc->Items->count();
 	bool savedAlignGrid = m_Doc->SnapGrid;
 	bool savedAlignGuides = m_Doc->SnapGuides;
 	bool savedAlignElement = m_Doc->SnapElement;
@@ -4377,6 +4376,9 @@
 	m_Doc->SnapGuides = false;
 	m_Doc->SnapElement = false;
 
+	m_Doc->setMasterPageMode(false);
+	int itemCount1 = m_Doc->Items->count();
+
 	QStringRef tagName = reader.name();
 	while (!reader.atEnd() && !reader.hasError())
 	{
@@ -4389,7 +4391,6 @@
 		ScXmlStreamAttributes tAtt = reader.attributes();
 			
 		ItemInfo itemInfo;
-		m_Doc->setMasterPageMode(false);
 		
 		//int ownPage = tAtt.valueAsInt("OwnPage");
 		success = readObject(doc, reader, itemInfo, baseDir, false);




More information about the scribus-commit mailing list