From 4adf9af4286dfeecdfe033ace1c2341d1ca1139b Mon Sep 17 00:00:00 2001 From: akl Date: Tue, 24 Dec 2013 11:47:38 +0000 Subject: [PATCH] Fix of INTPAL0052254 (Visibility icon is wrong in object browser): set 'hidden' visibility state for new objects only (that don't have any visibility state). --- src/SalomeApp/SalomeApp_Study.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index f483ef866..f5b0f58c4 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -185,13 +185,13 @@ public: /* Define visibility state */ bool isComponent = dynamic_cast( suit_obj ) != 0; - if ( suit_obj && !isComponent ) { + if ( suit_obj && !isComponent && myStudy->visibilityState( theID.c_str() ) == Qtx::UnpresentableState ) { 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 ); + myStudy->setVisibilityState( theID.c_str(), Qtx::HiddenState ); //hide the just added object //MESSAGE("Object with entry : "<< theID <<" CAN be displayed !!!"); } else -- 2.39.2