r19208 by jghali - #12358: Undo/Redo crashes Scribus restoring a Group + Item

scribus-commit scribus-commit at lists.scribus.net
Wed Jun 11 20:42:28 UTC 2014


Author: jghali
Date: Wed Jun 11 20:42:28 2014
New Revision: 19208

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19208
Log:
#12358: Undo/Redo crashes Scribus restoring a Group + Item

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

Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19208&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.cpp Wed Jun 11 20:42:28 2014
@@ -188,6 +188,7 @@
 		enabled  = true;
 		enabled &= !m_item->isArc();
 		enabled &= !m_item->isLine();
+		enabled &= !m_item->isOSGFrame();
 		enabled &= !m_item->isPathText();
 		enabled &= !m_item->isPolyLine();
 		enabled &= !m_item->isSpiral();
@@ -207,6 +208,7 @@
 		enabled  = true;
 		enabled &= !m_item->locked();
 		enabled &= !m_item->sizeLocked();
+		enabled &= !m_item->isOSGFrame();
 		enabled &= !m_item->isTable();
 	}
 	editShape->setEnabled(enabled);
@@ -227,20 +229,12 @@
 		int itemType = currItem ? (int) currItem->itemType() : -1;
 
 		m_haveItem = (itemType != -1);
-		if (itemType != -1)
-		{
-			enableEditShape();
-			enableCustomShape();
-		}
-		else
-		{
+		switch (itemType)
+		{
+		case -1:
+			setEnabled(false);
 			editShape->setEnabled(false);
 			customShape->setEnabled(false);
-		}
-		switch (itemType)
-		{
-		case -1:
-			setEnabled(false);
 			roundRect->setEnabled(false);
 			roundRect->showValue(0);
 			break;
@@ -343,6 +337,9 @@
 
 	if (!m_item) return;
 
+	enableEditShape();
+	enableCustomShape();
+
 	if (m_item->FrameType == 0)
 		customShape->setIcon(customShape->getIconPixmap(0));
 	if (m_item->FrameType == 1)




More information about the scribus-commit mailing list