r17510 by jghali - #10713: Crash on master pages when managing images

scribus-commit scribus-commit at lists.scribus.net
Thu May 17 22:14:42 UTC 2012


Author: jghali
Date: Thu May 17 22:14:42 2012
New Revision: 17510

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17510
Log:
#10713: Crash on master pages when managing images

Modified:
    trunk/Scribus/scribus/ui/picstatus.cpp

Modified: trunk/Scribus/scribus/ui/picstatus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17510&path=/trunk/Scribus/scribus/ui/picstatus.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/picstatus.cpp (original)
+++ trunk/Scribus/scribus/ui/picstatus.cpp Thu May 17 22:14:42 2012
@@ -396,7 +396,8 @@
 {
 	if (currItem != NULL)
 	{
-		ScCore->primaryMainWindow()->closeActiveWindowMasterPageEditor();
+		if (currItem->OnMasterPage.isEmpty() && currItem->doc()->masterPageMode())
+			ScCore->primaryMainWindow()->closeActiveWindowMasterPageEditor();
 		if (!currItem->OnMasterPage.isEmpty())
 			emit selectMasterPage(currItem->OnMasterPage);
 		else
@@ -409,7 +410,11 @@
 	if (currItem == NULL)
 		return;
 
-	ScCore->primaryMainWindow()->closeActiveWindowMasterPageEditor();
+	if (currItem->OnMasterPage.isEmpty() && currItem->doc()->masterPageMode())
+		ScCore->primaryMainWindow()->closeActiveWindowMasterPageEditor();
+	else if (!currItem->OnMasterPage.isEmpty() && !currItem->doc()->masterPageMode())
+		emit selectMasterPage(currItem->OnMasterPage);
+
 	emit selectElementByItem(currItem, true);
 }
 




More information about the scribus-commit mailing list