0020830: EDF 1357 GUI : Hide/Show Icon

This commit is contained in:
ptv 2010-11-17 08:47:59 +00:00
parent 3b2ddf07cc
commit 1ad6590ec1
2 changed files with 33 additions and 0 deletions

View File

@ -42,6 +42,7 @@
#include "SMESHGUI_FilterDlg.h"
#include "SMESHGUI_FilterLibraryDlg.h"
#include "SMESHGUI_FindElemByPointDlg.h"
#include "SMESHGUI_GEOMGenUtils.h"
#include "SMESHGUI_GroupDlg.h"
#include "SMESHGUI_GroupOnShapeDlg.h"
#include "SMESHGUI_GroupOpDlg.h"
@ -5453,3 +5454,32 @@ void SMESHGUI::onHypothesisEdit( int result )
SMESHGUI::Modified();
updateObjBrowser( true );
}
/*!
* \brief Virtual public slot
*
* This method updates visibility state
* Redefined to make visible geometry objects
*/
void SMESHGUI::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() ) );
SMESH::SMESH_IDSource_var anID = SMESH::SMESH_IDSource::_narrow( SMESH::SObjectToObject( aSObject ));
if ( !anID->_is_nil() && anObj->visibilityState() == SUIT_DataObject::Unpresentable )
anObj->setVisibilityState( SUIT_DataObject::Hidden );
}

View File

@ -50,6 +50,7 @@ class vtkObject;
class QDialog;
class SUIT_Desktop;
class SUIT_DataObject;
class SUIT_Study;
class SUIT_ViewWindow;
class SUIT_ResourceMgr;
@ -191,6 +192,8 @@ protected:
void* theClientData,
void* theCallData );
virtual void initVisibilityState( SUIT_DataObject* );
private:
void OnEditDelete();
int addVtkFontPref( const QString& label,