From: asl Date: Mon, 25 Jul 2005 05:13:02 +0000 (+0000) Subject: now the object browser uses "auto_size" preferences correctly X-Git-Tag: V3_0_1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=70b83613dee0a19bf22da0588e74c7f8172895a9;p=modules%2Fgui.git now the object browser uses "auto_size" preferences correctly --- 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(); + } }