From edf04148fea8d668a6ea419e18b1e9bc96c8e2f2 Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 12 Dec 2005 12:55:58 +0000 Subject: [PATCH] Apply debug on UpdateObjBrowser functionality --- src/LightApp/LightApp_Module.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index dfa6cc6c5..8db02d3be 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -100,9 +100,14 @@ void LightApp_Module::updateObjBrowser( bool theIsUpdateDataModel, if( theIsUpdateDataModel ){ if( CAM_DataModel* aDataModel = dataModel() ){ if ( LightApp_DataModel* aModel = dynamic_cast( aDataModel ) ) { + SUIT_DataObject* aParent = NULL; + if(theDataObject && theDataObject != aDataModel->root()) + aParent = theDataObject->parent(); + LightApp_DataObject* anObject = dynamic_cast(theDataObject); - SUIT_DataObject* aParent = anObject->parent(); - aModel->update( anObject, dynamic_cast( getApp()->activeStudy() ) ); + LightApp_Study* aStudy = dynamic_cast(getApp()->activeStudy()); + aModel->update( anObject, aStudy ); + if(aParent && aParent->childPos(anObject) < 0) aDataObject = dynamic_cast(aParent); } -- 2.39.2