From 70b83613dee0a19bf22da0588e74c7f8172895a9 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 25 Jul 2005 05:13:02 +0000 Subject: [PATCH] now the object browser uses "auto_size" preferences correctly --- src/SalomeApp/SalomeApp_Application.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 919ecd246..f03418709 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1238,7 +1238,7 @@ QWidget* SalomeApp_Application::createWindow( const int flag ) ob->addColumn( tr( QString().sprintf( "OBJ_BROWSER_COLUMN_%d", i ) ), i ); ob->setColumnShown( i, resMgr->booleanValue( "ObjectBrowser", QString().sprintf( "visibility_column_%d", i ), true ) ); - //ob->listView()->setColumnWidthMode( i, autoSize ? QListView::Maximum : QListView::Manual ); + ob->listView()->setColumnWidthMode( i, autoSize ? QListView::Maximum : QListView::Manual ); } // Create OBSelector @@ -1494,11 +1494,10 @@ void SalomeApp_Application::preferencesChanged( const QString& sec, const QStrin return; bool autoSize = resMgr->booleanValue( "ObjectBrowser", "auto_size", false ); - /*for ( int i = SalomeApp_DataObject::CT_Value; i <= SalomeApp_DataObject::CT_RefEntry; i++ ) + for ( int i = SalomeApp_DataObject::CT_Value; i <= SalomeApp_DataObject::CT_RefEntry; i++ ) ob->listView()->setColumnWidthMode( i, autoSize ? QListView::Maximum : QListView::Manual ); - if( autoSize ) - ob->listView()->adjustSize();*/ + updateObjectBrowser( false ); } } @@ -1817,7 +1816,10 @@ void SalomeApp_Application::updateObjectBrowser( const bool updateModels ) } if ( objectBrowser() ) + { + objectBrowser()->updateGeometry(); objectBrowser()->updateTree(); + } } -- 2.39.2