From: san Date: Wed, 15 Jun 2005 15:22:17 +0000 (+0000) Subject: getViewManager() correction X-Git-Tag: T3_0_0_a4~112 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bc0d739e4632848eda718e88e3b55a95d5a415d7;p=modules%2Fgui.git getViewManager() correction --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 3fee3dfad..401317f2d 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -714,15 +714,20 @@ SUIT_ViewManager* SalomeApp_Application::getViewManager( const QString& vmType, { SUIT_ViewManager* aVM = viewManager( vmType ); SUIT_ViewManager* anActiveVM = CAM_Application::activeViewManager(); + if ( anActiveVM && anActiveVM->getType() == vmType ) aVM = anActiveVM; - else if ( aVM ) + + if ( aVM && create ) { if ( !aVM->getActiveView() ) aVM->createView(); + else + aVM->getActiveView()->setFocus(); } else if ( create ) aVM = createViewManager( vmType ); + return aVM; }