[qet] [1587] Fixed items deletion in GenericPanel::deleteItem().

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 1587
Author:   xavier
Date:     2012-03-18 20:20:47 +0100 (Sun, 18 Mar 2012)
Log Message:
-----------
Fixed items deletion in GenericPanel::deleteItem().

Modified Paths:
--------------
    branches/0.3/sources/genericpanel.cpp

Modified: branches/0.3/sources/genericpanel.cpp
===================================================================
--- branches/0.3/sources/genericpanel.cpp	2012-03-18 08:35:33 UTC (rev 1586)
+++ branches/0.3/sources/genericpanel.cpp	2012-03-18 19:20:47 UTC (rev 1587)
@@ -1016,7 +1016,7 @@
 void GenericPanel::deleteItem(QTreeWidgetItem *item, bool deleted_on_cascade) {
 	Q_UNUSED(deleted_on_cascade)
 	// recursively delete child items first
-	for (int i = 0 ; i < item -> childCount() ; ++ i) {
+	for (int i = item -> childCount() - 1 ; i >= 0 ; -- i) {
 		deleteItem(item -> child(i), true);
 	}
 	


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/