From 8735e6a723330ece681806c08594b1d64eb95ffb Mon Sep 17 00:00:00 2001 From: rnc Date: Thu, 21 Feb 2013 18:02:25 +0000 Subject: [PATCH] EDF 2561 : Fixed performance issues of the object browser when "Resize column on expand item" is activated --- src/ObjBrowser/OB_Browser.cxx | 7 ++++++- src/ObjBrowser/OB_Browser.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index a628ccb78..3b1e172b2 100755 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -893,10 +893,15 @@ void OB_Browser::onExpandAll() { QModelIndexList indexes = selectedIndexes(); QModelIndex index; - + disconnect( treeView(), SIGNAL( expanded( const QModelIndex& ) ), + this, SLOT( onExpanded( const QModelIndex& ) ) ); + foreach ( index, indexes ) { myView->expandAll( index ); } + connect( treeView(), SIGNAL( expanded( const QModelIndex& ) ), + this, SLOT( onExpanded( const QModelIndex& ) ) ); + emit(onExpanded( index)); } /*! diff --git a/src/ObjBrowser/OB_Browser.h b/src/ObjBrowser/OB_Browser.h index a3d42a0d4..f468c9fbb 100755 --- a/src/ObjBrowser/OB_Browser.h +++ b/src/ObjBrowser/OB_Browser.h @@ -120,6 +120,7 @@ signals: private slots: void onExpandAll(); void onCollapseAll(); + virtual void onExpanded( const QModelIndex& ) = 0; //void onDestroyed( SUIT_DataObject* ); //void onDoubleClicked ( QListViewItem* ); //void onDropped( QPtrList, QListViewItem*, int ); -- 2.39.2