Improvement: now in rules you can use "canBeDisplayed" parameter. It is true, if current object can be displayed in active viewer. The result of this check is calculated by new virtual method LightApp_Displayer::canBeDisplayed. GEOM, SMESH, VISU overrides it in order to provide information, what object can be displayed in what viewer

This commit is contained in:
asl 2005-12-01 10:05:38 +00:00
parent adbaad82a8
commit 24e3153614
2 changed files with 6 additions and 0 deletions

View File

@ -78,3 +78,8 @@ SalomeApp_Study* SMESHGUI_Displayer::study() const
{
return dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
}
bool SMESHGUI_Displayer::canBeDisplayed( const QString& /*entry*/, const QString& viewer_type ) const
{
return viewer_type==SVTK_Viewer::Type();
}

View File

@ -41,6 +41,7 @@ public:
~SMESHGUI_Displayer();
virtual SALOME_Prs* buildPresentation( const QString&, SALOME_View* = 0 );
virtual bool canBeDisplayed( const QString& /*entry*/, const QString& /*viewer_type*/ ) const;
protected:
SalomeApp_Study* study() const;