From 24e3153614f15cfe5f0c5fa0510be46aca739576 Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 1 Dec 2005 10:05:38 +0000 Subject: [PATCH] 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 --- src/SMESHGUI/SMESHGUI_Displayer.cxx | 5 +++++ src/SMESHGUI/SMESHGUI_Displayer.h | 1 + 2 files changed, 6 insertions(+) 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; -- 2.39.2