#include "VISU_View_i.hh"
#include "VISU_ViewManager_i.hh"
#include "VISU_Plot3D_i.hh"
+#include "VISU_PrsObject_i.hh"
#include "VISU_Actor.h"
void VisuGUI::OnLineQuadMode(){
ChangeQuadratic2DRepresentation(this,VISU::LINES);
}
+
+/*!
+ * \brief Virtual public slot
+ *
+ * This method updates visibility state
+ * Redefined to make visible geometry objects
+ */
+void VisuGUI::initVisibilityState( SUIT_DataObject* theObject )
+{
+ // in fact, here we assume that all geometry objects presentable
+ LightApp_DataObject* anObj = dynamic_cast<LightApp_DataObject*>(theObject);
+ if (!anObj)
+ return;
+
+ SalomeApp_Application* app =
+ dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
+ if( !app )
+ return;
+
+ SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+ if( !appStudy )
+ return;
+
+ _PTR(Study) aStudy = appStudy->studyDS();
+ _PTR(SObject) aSObject( aStudy->FindObjectID( anObj->entry().toLatin1().data() ) );
+ VISU::PrsObject_var aPrs = VISU::PrsObject::_narrow( ClientSObjectToObject(aSObject) );
+ if ( !aPrs->_is_nil() && anObj->visibilityState() == SUIT_DataObject::Unpresentable )
+ anObj->setVisibilityState( SUIT_DataObject::Hidden );
+}