From: rnv Date: Thu, 17 Feb 2011 08:09:48 +0000 (+0000) Subject: Implementation of the "20830: EDF 1357 GUI : Hide/Show Icon" X-Git-Tag: Start_BR_19998_21191~64 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef26af8d03119bf29b17357bc360a6993590cac6;p=modules%2Fgeom.git Implementation of the "20830: EDF 1357 GUI : Hide/Show Icon" (at the moment implemeted only in GEOM and SMESH modules). --- diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index bafcf02ae..bc0403579 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -353,7 +353,8 @@ void GEOM_Displayer::Display( const Handle(SALOME_InteractiveObject)& theIO, int aMgrId = getViewManagerId(vf); SalomeApp_Study* aStudy = getStudy(); aStudy->setObjectProperty(aMgrId, theIO->getEntry(), VISIBILITY_PROP, 1 ); - + + setVisibilityState(theIO->getEntry(), Qtx::ShownState); delete prs; // delete presentation because displayer is its owner } @@ -406,6 +407,8 @@ void GEOM_Displayer::Erase( const Handle(SALOME_InteractiveObject)& theIO, int aMgrId = getViewManagerId(vf); SalomeApp_Study* aStudy = getStudy(); aStudy->setObjectProperty(aMgrId, theIO->getEntry(), VISIBILITY_PROP, 0 ); + + setVisibilityState(theIO->getEntry(), Qtx::HiddenState); } } } @@ -1562,9 +1565,9 @@ void GEOM_Displayer::setShape( const TopoDS_Shape& theShape ) myShape = theShape; } -bool GEOM_Displayer::canBeDisplayed( const QString& /*entry*/, const QString& viewer_type ) const +bool GEOM_Displayer::canBeDisplayed( const QString& entry, const QString& viewer_type ) const { - return viewer_type==SOCC_Viewer::Type() || viewer_type==SVTK_Viewer::Type(); + return viewer_type == SOCC_Viewer::Type() || viewer_type == SVTK_Viewer::Type(); } int GEOM_Displayer::SetDisplayMode( const int theMode )