From 8550948818153625a4f23def6eb2ab1b7e63d30b Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Wed, 16 Feb 2011 16:07:01 -0200 Subject: Fix bug 674 - "QGraphicsScene::clear() is missing" --- PySide/QtGui/typesystem_gui_common.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'PySide') diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index b7b28734a..724ac1eca 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -3099,7 +3099,21 @@ - + + + const QList<QGraphicsItem*> items = %CPPSELF.items(); + Shiboken::BindingManager& bm = Shiboken::BindingManager::instance(); + foreach (QGraphicsItem* item, items) { + SbkObject* obj = bm.retrieveWrapper(item); + if (obj) { + if (obj->ob_refcnt > 1) // If the refcnt is 1 the object will vannish anyway. + Shiboken::Object::invalidate(obj); + Shiboken::Object::removeParent(obj); + } + } + %CPPSELF.%FUNCTION_NAME(); + + -- cgit v1.2.3