]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix problem of column display in OB and column name in preferences.
authorgdd <gdd>
Tue, 22 Feb 2011 15:24:54 +0000 (15:24 +0000)
committergdd <gdd>
Tue, 22 Feb 2011 15:24:54 +0000 (15:24 +0000)
src/SalomeApp/SalomeApp_Application.cxx

index b1f2201a755151d721982f702b7d568ddfc5fd02..1d8ea36a9e977a9ca9a1577c10d0e97f3f57f644 100644 (file)
@@ -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 );
     }
 }