r19349 by jghali - #12529: Changing Document Layout/Master Pages might lead to crash

scribus-commit scribus-commit at lists.scribus.net
Wed Jul 16 22:01:00 UTC 2014


Author: jghali
Date: Wed Jul 16 22:01:00 2014
New Revision: 19349

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19349
Log:
#12529: Changing Document Layout/Master Pages might lead to crash

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19349&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Wed Jul 16 22:01:00 2014
@@ -2337,7 +2337,6 @@
 
 		scMW()->deletePage2(MasterNames[pageName]);
 		rebuildMasterNames();
-		scMW()->pagePalette->updateMasterPageList();
 	} 
 	else 
 	{
@@ -2346,10 +2345,10 @@
 		UndoObject *tmp = undoManager->replaceObject(
 					ss->getUInt("DUMMY_ID"), Pages->at(MasterNames[pageName]));
 		delete tmp;
-		scMW()->pagePalette->updateMasterPageList();
-		m_View->reformPages();
 	}
 	setMasterPageMode(oldMPMode);
+	scMW()->pagePalette->updateMasterPageList();
+	m_View->reformPages();
 }
 
 void ScribusDoc::restoreGrouping(SimpleState *state, bool isUndo)
@@ -4874,6 +4873,7 @@
 		applyMasterPage(oldName, pageNumber);
 	else
 		applyMasterPage(newName, pageNumber);
+	scMW()->pagePalette->rebuildPages();
 }
 
 




More information about the scribus-commit mailing list