]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Bug #280: Slow update of object browser.
authormzn <mzn@opencascade.com>
Tue, 24 Dec 2013 08:41:08 +0000 (08:41 +0000)
committermzn <mzn@opencascade.com>
Tue, 24 Dec 2013 08:41:08 +0000 (08:41 +0000)
src/HYDROGUI/HYDROGUI_Module.cxx

index 039aab232e07925348200b45e3688b1c630f01c7..3b007d9ce5c25cf631284b3efc93c7433e2e2da6 100644 (file)
@@ -76,6 +76,7 @@
 #include <SUIT_Desktop.h>
 #include <SUIT_Study.h>
 #include <SUIT_ViewManager.h>
+#include <SUIT_ResourceMgr.h>
 
 #include <SVTK_ViewManager.h>
 #include <SVTK_ViewModel.h>
@@ -670,8 +671,17 @@ void HYDROGUI_Module::update( const int flags )
     // the selection in the object browser.
     // Note: processEvents() should be called after updateGV(),
     // otherwise the application crashes from time to time.
-    //RKV: qApp->processEvents(); 
+    //RKV: qApp->processEvents();
+    SUIT_ResourceMgr* aResMgr = getApp()->resourceMgr();
+    bool isResizeOnExpandItem = aResMgr->booleanValue( "ObjectBrowser", "resize_on_expand_item", false );
+    SUIT_DataBrowser* anObjectBrowser = getApp()->objectBrowser();
+    if ( isResizeOnExpandItem && anObjectBrowser ) {
+      anObjectBrowser->setResizeOnExpandItem( false ); // MZN: ISSUE #280 
+    }
     getApp()->updateObjectBrowser( true );
+    if ( isResizeOnExpandItem && anObjectBrowser ) {
+      anObjectBrowser->setResizeOnExpandItem( true ); // MZN: ISSUE #280 
+    }
   }
 
   // Object browser is currently updated by using UF_Model flag