From: asl Date: Thu, 1 Dec 2005 10:05:38 +0000 (+0000) Subject: Improvement: now in rules you can use "canBeDisplayed" parameter. It is true, if... X-Git-Tag: BR_3_1_0_deb~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=24e3153614f15cfe5f0c5fa0510be46aca739576;p=modules%2Fsmesh.git 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 --- diff --git a/src/SMESHGUI/SMESHGUI_Displayer.cxx b/src/SMESHGUI/SMESHGUI_Displayer.cxx index 6d205706e..4f1a2457e 100644 --- a/src/SMESHGUI/SMESHGUI_Displayer.cxx +++ b/src/SMESHGUI/SMESHGUI_Displayer.cxx @@ -78,3 +78,8 @@ SalomeApp_Study* SMESHGUI_Displayer::study() const { return dynamic_cast( myApp->activeStudy() ); } + +bool SMESHGUI_Displayer::canBeDisplayed( const QString& /*entry*/, const QString& viewer_type ) const +{ + return viewer_type==SVTK_Viewer::Type(); +} diff --git a/src/SMESHGUI/SMESHGUI_Displayer.h b/src/SMESHGUI/SMESHGUI_Displayer.h index 4b4e3eea0..8b030526e 100644 --- a/src/SMESHGUI/SMESHGUI_Displayer.h +++ b/src/SMESHGUI/SMESHGUI_Displayer.h @@ -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;