From: gdd Date: Tue, 22 Feb 2011 15:24:54 +0000 (+0000) Subject: Fix problem of column display in OB and column name in preferences. X-Git-Tag: V6_3_0a1~54 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=78461c2d972fcabfbb22ba13f95da19d503cf512;p=modules%2Fgui.git Fix problem of column display in OB and column name in preferences. --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index b1f2201a7..1d8ea36a9 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -984,8 +984,8 @@ void SalomeApp_Application::createPreferences( LightApp_Preferences* pref ) int defCols = pref->addPreference( tr( "PREF_GROUP_DEF_COLUMNS" ), obTab ); for ( int i = SalomeApp_DataObject::EntryId; i <= SalomeApp_DataObject::RefEntryId; i++ ) { - pref->addPreference( tr( QString().sprintf( "OBJ_BROWSER_COLUMN_%d", i-1 ).toLatin1() ), defCols, - LightApp_Preferences::Bool, "ObjectBrowser", QString().sprintf( "visibility_column_id_%d", i ) ); + pref->addPreference( tr( QString().sprintf( "OBJ_BROWSER_COLUMN_%d", i-SalomeApp_DataObject::EntryId ).toLatin1() ), defCols, + LightApp_Preferences::Bool, "ObjectBrowser", QString().sprintf( "visibility_column_id_%d", i-1 ) ); } pref->setItemProperty( "orientation", Qt::Vertical, defCols ); @@ -1626,7 +1626,7 @@ void SalomeApp_Application::objectBrowserColumnsVisibility() if ( objectBrowser() ) for ( int i = SalomeApp_DataObject::EntryId; i <= SalomeApp_DataObject::RefEntryId; i++ ) { - bool shown = resourceMgr()->booleanValue( "ObjectBrowser", QString( "visibility_column_id_%1" ).arg( i ), true ); + bool shown = resourceMgr()->booleanValue( "ObjectBrowser", QString( "visibility_column_id_%1" ).arg( i-1 ), true ); objectBrowser()->treeView()->setColumnHidden( i, !shown ); } }