mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-14 09:38:33 +05:00
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:
parent
adbaad82a8
commit
24e3153614
@ -78,3 +78,8 @@ SalomeApp_Study* SMESHGUI_Displayer::study() const
|
|||||||
{
|
{
|
||||||
return dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
|
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();
|
||||||
|
}
|
||||||
|
@ -41,6 +41,7 @@ public:
|
|||||||
~SMESHGUI_Displayer();
|
~SMESHGUI_Displayer();
|
||||||
|
|
||||||
virtual SALOME_Prs* buildPresentation( const QString&, SALOME_View* = 0 );
|
virtual SALOME_Prs* buildPresentation( const QString&, SALOME_View* = 0 );
|
||||||
|
virtual bool canBeDisplayed( const QString& /*entry*/, const QString& /*viewer_type*/ ) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SalomeApp_Study* study() const;
|
SalomeApp_Study* study() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user