From: mzn Date: Tue, 24 Dec 2013 08:41:08 +0000 (+0000) Subject: Bug #280: Slow update of object browser. X-Git-Tag: BR_hydro_v_0_7~74 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2e94e7b253f4a6331efdd9eab7d23d3d7b6f82fe;p=modules%2Fhydro.git Bug #280: Slow update of object browser. --- diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index 039aab23..3b007d9c 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -76,6 +76,7 @@ #include #include #include +#include #include #include @@ -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