Salome HOME
Merge branch 'master' into pre/V8_2_BR
[modules/gui.git] / src / LightApp / LightApp_Application.cxx
index 1824defd3442e2fba42f0a73abaf3e4ae173342c..626bbc6b3559b1de3df12a529218f8e836a494f5 100644 (file)
@@ -1007,6 +1007,7 @@ void LightApp_Application::onHelpAbout()
 */
 void LightApp_Application::onSelection()
 {
+  //MESSAGE("onSelection")
   onSelectionChanged();
 
   if ( activeModule() && activeModule()->inherits( "LightApp_Module" ) )
@@ -1461,19 +1462,31 @@ SUIT_ViewManager* LightApp_Application::getViewManager( const QString& vmType, c
 {
   SUIT_ViewManager* aVM = viewManager( vmType );
   SUIT_ViewManager* anActiveVM = CAM_Application::activeViewManager();
-
+  MESSAGE("vmType: " << vmType.toStdString() << " aVM: " << aVM << " anActiveVM: " << anActiveVM );
   if ( anActiveVM && anActiveVM->getType() == vmType )
-    aVM = anActiveVM;
+    {
+      MESSAGE("aVM = anActiveVM");
+      aVM = anActiveVM;
+    }
 
   if ( aVM && create )
   {
     if ( !aVM->getActiveView() )
-      aVM->createView();
+      {
+        MESSAGE("aVM->createView()");
+        aVM->createView();
+      }
     else
-      desktop()->setActiveWindow( aVM->getActiveView() );
+      {
+        MESSAGE("desktop()->setActiveWindow: " << aVM->getActiveView());
+        desktop()->setActiveWindow( aVM->getActiveView() );
+      }
   }
   else if ( create )
-    aVM = createViewManager( vmType );
+    {
+      MESSAGE("aVM = createViewManager( vmType )");
+      aVM = createViewManager( vmType );
+    }
 
   return aVM;
 }