From: ouv Date: Fri, 28 Mar 2008 11:18:22 +0000 (+0000) Subject: Bug IPAL19361 - Qt4 porting. It is impossible showing ID of elements in 3D Viewer... X-Git-Tag: V5_0_0a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f642a039ccbc80c7ba5d2bb95b3ebe6dcf51c755;p=modules%2Fgui.git Bug IPAL19361 - Qt4 porting. It is impossible showing ID of elements in 3D Viewer because corresponding string is missing in the pop-up menu --- diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index 901ca9bd0..883cfccf3 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -124,7 +124,8 @@ void LightApp_Module::viewManagers( QStringList& ) const /*!Context menu popup.*/ void LightApp_Module::contextMenuPopup( const QString& client, QMenu* menu, QString& /*title*/ ) { - LightApp_Selection* sel = createSelection( client, getApp()->selectionMgr() ); + LightApp_Selection* sel = createSelection(); + sel->init( client, getApp()->selectionMgr() ); popupMgr()->setSelection( sel ); popupMgr()->setMenu( menu ); popupMgr()->updateMenu(); @@ -290,9 +291,9 @@ CAM_DataModel* LightApp_Module::createDataModel() } /*!Create and return instance of LightApp_Selection.*/ -LightApp_Selection* LightApp_Module::createSelection( const QString& client, LightApp_SelectionMgr* mgr ) const +LightApp_Selection* LightApp_Module::createSelection() const { - return new LightApp_Selection( client, mgr ); + return new LightApp_Selection(); } /*!NOT IMPLEMENTED*/ diff --git a/src/LightApp/LightApp_Module.h b/src/LightApp/LightApp_Module.h index 58dec54ac..b05611454 100644 --- a/src/LightApp/LightApp_Module.h +++ b/src/LightApp/LightApp_Module.h @@ -88,7 +88,7 @@ public: virtual void studyActivated() {}; virtual LightApp_Displayer* displayer(); - virtual LightApp_Selection* createSelection( const QString&, LightApp_SelectionMgr* ) const; + virtual LightApp_Selection* createSelection() const; public slots: virtual bool activateModule( SUIT_Study* ); diff --git a/src/LightApp/LightApp_Selection.cxx b/src/LightApp/LightApp_Selection.cxx index c0654025c..e087293e4 100644 --- a/src/LightApp/LightApp_Selection.cxx +++ b/src/LightApp/LightApp_Selection.cxx @@ -35,8 +35,22 @@ /*! Constructor */ -LightApp_Selection::LightApp_Selection( const QString& client, LightApp_SelectionMgr* mgr ) +LightApp_Selection::LightApp_Selection() : myStudy( 0 ) +{ +} + +/*! + Destructor. +*/ +LightApp_Selection::~LightApp_Selection() +{ +} + +/*! + Initialization. +*/ +void LightApp_Selection::init( const QString& client, LightApp_SelectionMgr* mgr) { myPopupClient = client; @@ -92,13 +106,6 @@ LightApp_Selection::LightApp_Selection( const QString& client, LightApp_Selectio } } -/*! - Destructor. -*/ -LightApp_Selection::~LightApp_Selection() -{ -} - QString LightApp_Selection::referencedToEntry( const QString& entry ) const { return myStudy->referencedToEntry( entry ); diff --git a/src/LightApp/LightApp_Selection.h b/src/LightApp/LightApp_Selection.h index c95c53d9d..c7d084c55 100644 --- a/src/LightApp/LightApp_Selection.h +++ b/src/LightApp/LightApp_Selection.h @@ -47,9 +47,10 @@ class SUIT_ViewWindow; class LIGHTAPP_EXPORT LightApp_Selection : public QtxPopupSelection { public: - LightApp_Selection( const QString&, LightApp_SelectionMgr* ); + LightApp_Selection(); virtual ~LightApp_Selection(); + virtual void init( const QString&, LightApp_SelectionMgr* ); virtual void processOwner( const LightApp_DataOwner* ); virtual int count() const; diff --git a/src/LightApp/LightApp_ShowHideOp.cxx b/src/LightApp/LightApp_ShowHideOp.cxx index 39d845bac..86d694c1b 100644 --- a/src/LightApp/LightApp_ShowHideOp.cxx +++ b/src/LightApp/LightApp_ShowHideOp.cxx @@ -65,10 +65,11 @@ void LightApp_ShowHideOp::startOperation() if( !mod ) return; - LightApp_Selection* sel = mod->createSelection( "", mgr ); + LightApp_Selection* sel = mod->createSelection(); if( !sel ) return; + sel->init( "", mgr ); if( sel->count()==0 && myActionType!=ERASE_ALL ) { abort(); diff --git a/src/SalomeApp/SalomeApp_Module.cxx b/src/SalomeApp/SalomeApp_Module.cxx index 918c514ac..7c800c426 100644 --- a/src/SalomeApp/SalomeApp_Module.cxx +++ b/src/SalomeApp/SalomeApp_Module.cxx @@ -65,9 +65,9 @@ CAM_DataModel* SalomeApp_Module::createDataModel() } /*!Create and return instance of LightApp_Selection.*/ -LightApp_Selection* SalomeApp_Module::createSelection( const QString& client, LightApp_SelectionMgr* mgr ) const +LightApp_Selection* SalomeApp_Module::createSelection() const { - return LightApp_Module::createSelection( client, mgr ); + return LightApp_Module::createSelection(); } /*! diff --git a/src/SalomeApp/SalomeApp_Module.h b/src/SalomeApp/SalomeApp_Module.h index 1231c2678..dbb1631a8 100644 --- a/src/SalomeApp/SalomeApp_Module.h +++ b/src/SalomeApp/SalomeApp_Module.h @@ -58,7 +58,7 @@ public: virtual void storeVisualParameters(int savePoint); virtual void restoreVisualParameters(int savePoint); - virtual LightApp_Selection* createSelection( const QString&, LightApp_SelectionMgr* ) const; + virtual LightApp_Selection* createSelection() const; protected: virtual CAM_DataModel* createDataModel();