]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Bug IPAL22462: TC6.3.0: run button is disabled after creation of animated series V6_3_0b1
authorouv <ouv@opencascade.com>
Wed, 4 May 2011 10:45:10 +0000 (10:45 +0000)
committerouv <ouv@opencascade.com>
Wed, 4 May 2011 10:45:10 +0000 (10:45 +0000)
src/LightApp/LightApp_Application.cxx

index cf22f07023e547a2362654cbedb04620050f2db6..03c32471b64ce56d89c35f6fc3637b916d625bdf 100644 (file)
@@ -3619,10 +3619,26 @@ QString LightApp_Application::browseObjects( const QStringList& theEntryList,
   // always select the last object
   if( anObject && !anEntry.isEmpty() )
   {
-    SUIT_DataOwnerPtrList aList;
-    aList.append( new LightApp_DataOwner( anEntry ) );
-    selectionMgr()->setSelected( aList );
-    aResult = anEntry;
+    QList<SUIT_Selector*> aSelectorList;
+    selectionMgr()->selectors( "ObjectBrowser", aSelectorList );
+    if( !aSelectorList.isEmpty() )
+    {
+      if( LightApp_OBSelector* aSelector = dynamic_cast<LightApp_OBSelector*>( aSelectorList.first() ) )
+      {
+        bool anIsAutoBlock = aSelector->autoBlock();
+
+        // temporarily disable auto block, to emit LightApp_SelectionMgr::currentSelectionChanged() signal
+        aSelector->setAutoBlock( false );
+
+        SUIT_DataOwnerPtrList aList;
+        aList.append( new LightApp_DataOwner( anEntry ) );
+        selectionMgr()->setSelected( aList );
+        aResult = anEntry;
+
+        // restore auto block flag
+        aSelector->setAutoBlock( anIsAutoBlock );
+      }
+    }
   }
 
   return aResult;