From 660fb008953e75c70ae25d53a1dcf9771e006dc9 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Fri, 8 Mar 2013 06:07:21 +0100 Subject: [PATCH] MODIFIED: Widgets derived from CInterfaceGroup should now be deleted too properly. --HG-- branch : gsoc2012-gui-editor --- .../src/plugins/gui_editor/editor_message_processor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp index 36e3481e0..28cc7d75b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/editor_message_processor.cpp @@ -41,9 +41,9 @@ namespace GUIEditor if( e == NULL ) return; - CInterfaceElement *p = e; - while( ( p != NULL ) && !p->isGroup() ) - p = p->getParent(); + CInterfaceElement *p = e->getParent(); + if( p == NULL ) + return; CInterfaceGroup *g = dynamic_cast< CInterfaceGroup* >( p ); if( g == NULL )