From bc0d739e4632848eda718e88e3b55a95d5a415d7 Mon Sep 17 00:00:00 2001 From: san Date: Wed, 15 Jun 2005 15:22:17 +0000 Subject: [PATCH] getViewManager() correction --- src/SalomeApp/SalomeApp_Application.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; } -- 2.39.2