From 7de9ce42f380ee4925ed0158e86a57688aee73d9 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 9 Mar 2011 09:31:01 +0000 Subject: [PATCH] Additional changes for issue 0020830: redesign methods of the SALOME View / Displayer / Presentation to handle pre-display/erase and post-display/erase operations properly. --- src/VISUGUI/VisuGUI_Displayer.cxx | 12 ++++++------ src/VISUGUI/VisuGUI_Displayer.h | 7 +++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/VISUGUI/VisuGUI_Displayer.cxx b/src/VISUGUI/VisuGUI_Displayer.cxx index cad7276a..3545896c 100644 --- a/src/VISUGUI/VisuGUI_Displayer.cxx +++ b/src/VISUGUI/VisuGUI_Displayer.cxx @@ -54,8 +54,8 @@ -void changeVisibility(int theDisplaying, QString entry, SalomeApp_Study* study) { - +void changeVisibility(int theDisplaying, QString entry, SalomeApp_Study* study) +{ _PTR(SObject) obj = study->studyDS()->FindObjectID( (const char*)entry.toLatin1() ); CORBA::Object_var anObj = VISU::ClientSObjectToObject( obj ); if( CORBA::is_nil( anObj ) ) @@ -418,10 +418,10 @@ bool VisuGUI_Displayer::canBeDisplayed( const QString& entry, const QString& vie return false; } -void VisuGUI_Displayer::AfterDisplay( SALOME_View* vf, const SALOME_Plot2dViewType& ) { - changeVisibility(VISU::eDisplay, myLastEntry,dynamic_cast( myApp->activeStudy())); +void VisuGUI_Displayer::AfterDisplay( SALOME_View* vf, const SALOME_Prs2d* p ) { + changeVisibility(VISU::eDisplay, myLastEntry, dynamic_cast( myApp->activeStudy())); } -void VisuGUI_Displayer::AfterErase( SALOME_View* vf, const SALOME_Plot2dViewType& ) { - changeVisibility(VISU::eErase, myLastEntry,dynamic_cast( myApp->activeStudy())); +void VisuGUI_Displayer::AfterErase( SALOME_View* vf, const SALOME_Prs2d* p ) { + changeVisibility(VISU::eErase, myLastEntry, dynamic_cast( myApp->activeStudy())); } diff --git a/src/VISUGUI/VisuGUI_Displayer.h b/src/VISUGUI/VisuGUI_Displayer.h index 14a1a4a8..a5004021 100644 --- a/src/VISUGUI/VisuGUI_Displayer.h +++ b/src/VISUGUI/VisuGUI_Displayer.h @@ -47,11 +47,10 @@ public: virtual SALOME_Prs* buildPresentation( const QString&, SALOME_View* = 0 ); virtual bool canBeDisplayed( const QString& /*entry*/, const QString& /*viewer_type*/ ) const; - virtual bool IsDisplayed( const QString&, SALOME_View* = 0 ) const; + virtual bool IsDisplayed( const QString&, SALOME_View* = 0 ) const; - virtual void AfterDisplay ( SALOME_View*, const SALOME_Plot2dViewType& ); - virtual void AfterErase ( SALOME_View*, const SALOME_Plot2dViewType& ); - + virtual void AfterDisplay ( SALOME_View*, const SALOME_Prs2d* ); + virtual void AfterErase( SALOME_View*, const SALOME_Prs2d* ); protected: bool addCurve ( SPlot2d_Prs*, Plot2d_ViewWindow*, VISU::Curve_i* ) const; -- 2.39.2