]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
getViewManager() correction
authorsan <san@opencascade.com>
Wed, 15 Jun 2005 15:22:17 +0000 (15:22 +0000)
committersan <san@opencascade.com>
Wed, 15 Jun 2005 15:22:17 +0000 (15:22 +0000)
src/SalomeApp/SalomeApp_Application.cxx

index 3fee3dfad17184a3239f197a5d41896a186ab56c..401317f2dce29a6c5469eb03146201ac37559ed7 100644 (file)
@@ -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;
 }