From e8b483fa9d19c6c3615522d2b0a6855a8ad3477c Mon Sep 17 00:00:00 2001 From: John Ehresman Date: Wed, 18 Apr 2012 10:14:17 -0400 Subject: [PATCH] Invalidate invisibleRootItem on clear --- PySide/QtGui/typesystem_gui_common.xml | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index 1ff12f0..789befd 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -4856,6 +4856,11 @@ + QStandardItem* root = %CPPSELF.invisibleRootItem(); + PyObject *pyRoot = %CONVERTTOPYTHON[QStandardItem*](root); + Shiboken::Object::invalidate(pyRoot); + Py_XDECREF(pyRoot); + for(int r=0, r_max = %CPPSELF.rowCount(); r < r_max; r++) { QList<QStandardItem *> ri = %CPPSELF.takeRow(0); -- 1.7.9.msysgit.0