From 49155b853f3c6592e518ed188a20b083095e1b4c Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Tue, 28 Feb 2017 15:01:53 +0100 Subject: [PATCH] a better way to activate the viewManager --- src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx | 3 ++- src/STD/STD_Application.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx index 6e73d1c65..60ef71c81 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx @@ -2901,7 +2901,8 @@ public: if ( wnd ) { LightApp_Application* app = getApplication(); - app->setActiveViewManager(wnd->getViewManager()); + app->desktop()->windowActivated(wnd); + //app->setActiveViewManager(wnd->getViewManager()); wnd->setFocus(); myResult = true; } diff --git a/src/STD/STD_Application.h b/src/STD/STD_Application.h index be2c85389..06ad40df9 100755 --- a/src/STD/STD_Application.h +++ b/src/STD/STD_Application.h @@ -104,8 +104,6 @@ public: virtual void updateDesktopTitle(); - virtual void setActiveViewManager( SUIT_ViewManager* ); - signals: /*!emit that view manager added*/ void viewManagerAdded( SUIT_ViewManager* ); @@ -163,6 +161,8 @@ protected: virtual void beforeCloseDoc( SUIT_Study* theDoc ); virtual void afterCloseDoc(); + virtual void setActiveViewManager( SUIT_ViewManager* ); + virtual int openChoice( const QString& ); virtual bool openAction( const int, const QString& ); -- 2.39.2