From 7a65fcf359c5e281fd628d3b14ad36c5293e2dc1 Mon Sep 17 00:00:00 2001 From: san Date: Fri, 29 Jul 2005 11:27:12 +0000 Subject: [PATCH] Preparation of v.3.0.1 --- src/ObjBrowser/OB_Browser.cxx | 6 ++++++ src/ObjBrowser/OB_Browser.h | 2 ++ src/SalomeApp/SalomeApp_Application.cxx | 5 ++--- src/SalomeApp/resources/SalomeApp.xml | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/ObjBrowser/OB_Browser.cxx b/src/ObjBrowser/OB_Browser.cxx index 129503b0d..a660a57d7 100755 --- a/src/ObjBrowser/OB_Browser.cxx +++ b/src/ObjBrowser/OB_Browser.cxx @@ -456,6 +456,12 @@ void OB_Browser::setColumnShown( const int id, const bool on ) myView->setShown( myColumnIds[id], on ); } +void OB_Browser::setWidthMode( QListView::WidthMode mode ) +{ + for ( int i = 0, n = myView->columns(); i < n; i++ ) + myView->setColumnWidthMode( i, mode ); +} + QValueList OB_Browser::columns() const { QValueList lst; diff --git a/src/ObjBrowser/OB_Browser.h b/src/ObjBrowser/OB_Browser.h index 3d2ebb1c3..944a8ccf3 100755 --- a/src/ObjBrowser/OB_Browser.h +++ b/src/ObjBrowser/OB_Browser.h @@ -86,6 +86,8 @@ public: bool isColumnVisible( const int ) const; virtual void setColumnShown( const int, const bool ); + virtual void setWidthMode( QListView::WidthMode ); + QValueList columns() const; bool appropriateColumn( const int ) const; diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 3d89aae00..beeb25897 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1261,8 +1261,8 @@ 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->setWidthMode( autoSize ? QListView::Maximum : QListView::Manual ); // Create OBSelector new SalomeApp_OBSelector( ob, mySelMgr ); @@ -1527,8 +1527,7 @@ 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++ ) - ob->listView()->setColumnWidthMode( i, autoSize ? QListView::Maximum : QListView::Manual ); + ob->setWidthMode( autoSize ? QListView::Maximum : QListView::Manual ); updateObjectBrowser( false ); } diff --git a/src/SalomeApp/resources/SalomeApp.xml b/src/SalomeApp/resources/SalomeApp.xml index ff3970cb3..4471ba989 100644 --- a/src/SalomeApp/resources/SalomeApp.xml +++ b/src/SalomeApp/resources/SalomeApp.xml @@ -74,7 +74,7 @@
- +
-- 2.39.2