From 2e94e7b253f4a6331efdd9eab7d23d3d7b6f82fe Mon Sep 17 00:00:00 2001 From: mzn Date: Tue, 24 Dec 2013 08:41:08 +0000 Subject: [PATCH] Bug #280: Slow update of object browser. --- src/HYDROGUI/HYDROGUI_Module.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- 2.39.2