From d96b6b8f7478715d8b358eed96ed5da76206e853 Mon Sep 17 00:00:00 2001 From: ouv Date: Fri, 28 Mar 2008 11:23:48 +0000 Subject: [PATCH] Bug IPAL19361 - Qt4 porting. It is impossible showing ID of elements in 3D Viewer because corresponding string is missing in the pop-up menu --- src/SMESHGUI/SMESHGUI.cxx | 4 ++-- src/SMESHGUI/SMESHGUI.h | 2 +- src/SMESHGUI/SMESHGUI_Selection.cxx | 30 +++++++++++++++++++---------- src/SMESHGUI/SMESHGUI_Selection.h | 3 ++- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index cfbea4a4e..1d2213d5b 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -3055,9 +3055,9 @@ QString SMESHGUI::engineIOR() const return QString( anIOR.in() ); } -LightApp_Selection* SMESHGUI::createSelection( const QString& client, LightApp_SelectionMgr* mgr ) const +LightApp_Selection* SMESHGUI::createSelection() const { - return new SMESHGUI_Selection( client, mgr ); + return new SMESHGUI_Selection(); } void SMESHGUI::windows( QMap& aMap ) const diff --git a/src/SMESHGUI/SMESHGUI.h b/src/SMESHGUI/SMESHGUI.h index 9c5f591be..b644fb4e1 100644 --- a/src/SMESHGUI/SMESHGUI.h +++ b/src/SMESHGUI/SMESHGUI.h @@ -93,7 +93,7 @@ public : virtual bool OnMouseMove( QMouseEvent*, SUIT_ViewWindow* ); virtual bool OnKeyPress( QKeyEvent*, SUIT_ViewWindow* ); - virtual LightApp_Selection* createSelection( const QString&, LightApp_SelectionMgr* ) const; + virtual LightApp_Selection* createSelection() const; virtual void BuildPresentation ( const Handle(SALOME_InteractiveObject)&, SUIT_ViewWindow* = 0 ); diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 9a7fe52c2..af48b3008 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -48,9 +48,27 @@ //function : SMESHGUI_Selection //purpose : //======================================================================= -SMESHGUI_Selection::SMESHGUI_Selection( const QString& client, LightApp_SelectionMgr* mgr ) -: LightApp_Selection( client, mgr ) +SMESHGUI_Selection::SMESHGUI_Selection() +: LightApp_Selection() { +} + +//======================================================================= +//function : ~SMESHGUI_Selection +//purpose : +//======================================================================= +SMESHGUI_Selection::~SMESHGUI_Selection() +{ +} + +//======================================================================= +//function : init +//purpose : +//======================================================================= +void SMESHGUI_Selection::init( const QString& client, LightApp_SelectionMgr* mgr ) +{ + LightApp_Selection::init( client, mgr ); + if( mgr && study() ) { SalomeApp_Study* aSStudy = dynamic_cast(study()); @@ -63,14 +81,6 @@ SMESHGUI_Selection::SMESHGUI_Selection( const QString& client, LightApp_Selectio } } -//======================================================================= -//function : ~SMESHGUI_Selection -//purpose : -//======================================================================= -SMESHGUI_Selection::~SMESHGUI_Selection() -{ -} - //======================================================================= //function : processOwner //purpose : diff --git a/src/SMESHGUI/SMESHGUI_Selection.h b/src/SMESHGUI/SMESHGUI_Selection.h index ac12c8166..2b77aaf3f 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.h +++ b/src/SMESHGUI/SMESHGUI_Selection.h @@ -43,9 +43,10 @@ class SMESH_Actor; class SMESHGUI_EXPORT SMESHGUI_Selection : public LightApp_Selection { public: - SMESHGUI_Selection( const QString&, LightApp_SelectionMgr* ); + SMESHGUI_Selection(); virtual ~SMESHGUI_Selection(); + virtual void init( const QString&, LightApp_SelectionMgr* ); virtual QVariant parameter( const int, const QString& ) const; virtual void processOwner( const LightApp_DataOwner* ); -- 2.39.2