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<int> OB_Browser::columns() const
{
QValueList<int> lst;
bool isColumnVisible( const int ) const;
virtual void setColumnShown( const int, const bool );
+ virtual void setWidthMode( QListView::WidthMode );
+
QValueList<int> columns() const;
bool appropriateColumn( const int ) const;
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 );
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 );
}
<!-- Here go other common user preferences -->
</section>
<section name="ObjectBrowser" >
- <parameter value="true" name="auto_size" />
+ <parameter value="false" name="auto_size" />
</section>
<section name="Geometry" >
<parameter value="10" name="SettingsGeomStep" />