From: akl Date: Wed, 31 Jul 2013 08:14:39 +0000 (+0000) Subject: Fix of 0022288: [CEA 913] The eye that gives acces to "show" is missing: X-Git-Tag: BR_hydro_v_0_3_1~95 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=de3e3d1d2c3ee33210bdf3424a24f26cc6029809;p=modules%2Fgui.git Fix of 0022288: [CEA 913] The eye that gives acces to "show" is missing: visibility state is set after appending of SO to use case builder. --- diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index ef989b5a4..07ffd4aba 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -183,6 +183,22 @@ public: //aFatherDO->insertChild(suit_obj, pos); aFatherDO->updateItem(); + /* Define visibility state */ + bool isComponent = dynamic_cast( suit_obj ) != 0; + if ( suit_obj && !isComponent ) { + QString moduleTitle = ((CAM_Application*)myStudy->application())->moduleTitle(suit_obj->componentDataType()); + if (!moduleTitle.isEmpty()) { + LightApp_Displayer* aDisplayer = LightApp_Displayer::FindDisplayer(moduleTitle,false); + if (aDisplayer) { + if(aDisplayer->canBeDisplayed(theID.c_str())) { + myStudy->setVisibilityState( theID.c_str(), Qtx::HiddenState ); + //MESSAGE("Object with entry : "<< theID <<" CAN be displayed !!!"); + } + else + MESSAGE("Object with entry : "<< theID <<" CAN'T be displayed !!!"); + } + } + } } // END: work with tree nodes structure else { // BEGIN: work with study structure EntryMapIter it = entry2SuitObject.find( theID );