From 9128c712e69d6b7ef64f6c48053de56eda81d2f1 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 16 Aug 2014 02:01:07 +0200 Subject: [PATCH] Only add atoms to the property browser. --- .../src/plugins/georges_editor/browser_ctrl.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/code/studio/src/plugins/georges_editor/browser_ctrl.cpp b/code/studio/src/plugins/georges_editor/browser_ctrl.cpp index 5499854a9..eb2ef7508 100644 --- a/code/studio/src/plugins/georges_editor/browser_ctrl.cpp +++ b/code/studio/src/plugins/georges_editor/browser_ctrl.cpp @@ -47,7 +47,7 @@ public: m_browser = NULL; } - void setupElement( NLGEORGES::CFormElmStruct::CFormElmStructElm &elm ) + void setupAtom( NLGEORGES::CFormElmStruct::CFormElmStructElm &elm ) { QString key = elm.Name.c_str(); QString value = ""; @@ -70,12 +70,15 @@ public: m_browser->addProperty( p ); } - void setupForm( NLGEORGES::CFormElmStruct *st ) + void setupStruct( NLGEORGES::CFormElmStruct *st ) { for( int i = 0; i < st->Elements.size(); i++ ) { NLGEORGES::CFormElmStruct::CFormElmStructElm &elm = st->Elements[ i ]; - setupElement( elm ); + if( ( elm.Element != NULL ) && !elm.Element->isAtom() ) + continue; + + setupAtom( elm ); } m_currentNode = st; @@ -152,7 +155,7 @@ void BrowserCtrl::clicked( const QModelIndex &idx ) return; NLGEORGES::CFormElmStruct *st = static_cast< NLGEORGES::CFormElmStruct* >( node ); - m_pvt->setupForm( st ); + m_pvt->setupStruct( st ); enableMgrConnections();