r16551 by jghali - fix crash when ungrouping

scribus-commit scribus-commit at lists.scribus.net
Mon Apr 4 00:31:08 CEST 2011


Author: jghali
Date: Sun Apr  3 22:31:08 2011
New Revision: 16551

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16551
Log:
fix crash when ungrouping

Modified:
    trunk/Scribus/scribus/scribusdoc.cpp

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16551&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sun Apr  3 22:31:08 2011
@@ -12423,11 +12423,15 @@
 			}
 			tempSelection.clear();
 			tempSelection.delaySignalsOff();
-			delete currItem;
 			renumberItemsInListOrder();
 		}
 		setLoading(wasLoad);
 		itemSelection->delaySignalsOff();
+
+		// Delete items after delaySignalsOff() call so that palette are updated before item deletion
+		for (int b = 0; b < toDelete.count(); b++)
+			delete currItem;
+
 		// Create undo actions
 /*		UndoTransaction* undoTransaction = NULL;
 		if (UndoManager::undoEnabled() && toDelete.count() > 1)




More information about the scribus-commit mailing list