From: vsr Date: Fri, 10 Apr 2015 10:10:57 +0000 (+0300) Subject: Fix incorrect implementation made in commit 53e2fb5 X-Git-Tag: V7_6_0b1~4^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ec360625f99b83901243765788d643eccd9c619e;p=modules%2Fmed.git Fix incorrect implementation made in commit 53e2fb5 --- diff --git a/src/MEDOP/gui/MEDOPModule.cxx b/src/MEDOP/gui/MEDOPModule.cxx index de984bb5c..ff3ea17c7 100644 --- a/src/MEDOP/gui/MEDOPModule.cxx +++ b/src/MEDOP/gui/MEDOPModule.cxx @@ -26,12 +26,7 @@ #include CORBA_CLIENT_HEADER(SALOMEDS) #include "MEDOPFactoryClient.hxx" - -#include -#include "PVViewer_ViewManager.h" -#include "PVViewer_ViewWindow.h" #include "PVViewer_ViewModel.h" -#include "SUIT_ViewManager.h" MEDOPModule::MEDOPModule() : StandardApp_Module() @@ -88,35 +83,9 @@ void MEDOPModule::createModuleWidgets() { _workspaceController, SLOT(processDatasourceEvent(const DatasourceEvent *))); } -/*! - \brief Shows (toShow = true) or hides ParaView view window -*/ -void MEDOPModule::showView( bool toShow ) -{ - LightApp_Application* anApp = getApp(); - PVViewer_ViewManager* viewMgr = - dynamic_cast( anApp->getViewManager( PVViewer_Viewer::Type(), false ) ); - if ( !viewMgr ) { - viewMgr = new PVViewer_ViewManager( anApp->activeStudy(), anApp->desktop(), anApp->logWindow() ); - anApp->addViewManager( viewMgr ); - connect( viewMgr, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ), - anApp, SLOT( onCloseView( SUIT_ViewManager* ) ) ); - } - - PVViewer_ViewWindow* pvWnd = dynamic_cast( viewMgr->getActiveView() ); - if ( !pvWnd ) { - pvWnd = dynamic_cast( viewMgr->createViewWindow() ); - // this also connects to the pvserver and instantiates relevant PV behaviors - } - - pvWnd->setShown( toShow ); - if ( toShow ) pvWnd->setFocus(); -} - bool MEDOPModule::activateModule( SUIT_Study* theStudy ) { bool bOk = StandardApp_Module::activateModule( theStudy ); - showView(true); _workspaceController->showDockWidgets(true); this->setDockLayout(StandardApp_Module::DOCKLAYOUT_LEFT_VLARGE); return bOk; @@ -125,7 +94,6 @@ bool MEDOPModule::deactivateModule( SUIT_Study* theStudy ) { _workspaceController->showDockWidgets(false); this->unsetDockLayout(); - showView(false); return StandardApp_Module::deactivateModule( theStudy ); } @@ -135,3 +103,8 @@ void MEDOPModule::createModuleActions() { // Creating actions concerning the workspace _workspaceController->createActions(); } + +void MEDOPModule::viewManagers( QStringList& list ) const +{ + list.append( PVViewer_Viewer::Type() ); +} diff --git a/src/MEDOP/gui/MEDOPModule.hxx b/src/MEDOP/gui/MEDOPModule.hxx index f38f4cb70..e6859b999 100644 --- a/src/MEDOP/gui/MEDOPModule.hxx +++ b/src/MEDOP/gui/MEDOPModule.hxx @@ -46,6 +46,7 @@ class MEDOPGUI_EXPORT MEDOPModule: public StandardApp_Module public: MEDOPModule(); + void viewManagers( QStringList& ) const; protected: virtual Engines::EngineComponent_ptr getEngine() const; @@ -55,10 +56,6 @@ protected: virtual bool activateModule( SUIT_Study* theStudy ); virtual bool deactivateModule( SUIT_Study* theStudy ); - private: - //! Shows or hides ParaView view window - void showView(bool); - private: DatasourceController * _datasourceController; WorkspaceController * _workspaceController;