From: san Date: Wed, 16 Nov 2011 16:36:21 +0000 (+0000) Subject: Issue 21379: [CEA 504] Implement mechanism of references in Object Browser in light... X-Git-Tag: PPGP_V0_1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4f50bc76a2f0784f68e8c9fa0694771888515499;p=modules%2Fgui.git Issue 21379: [CEA 504] Implement mechanism of references in Object Browser in light SALOME GUI. SalomeApp_DataObject::LastId introduced for column Id iteration purposes, so as not to depend on particular enumaration values for column Ids --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index d5df66f50..0f175de44 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -990,7 +990,7 @@ void SalomeApp_Application::createPreferences( LightApp_Preferences* pref ) int salomeCat = pref->addPreference( tr( "PREF_CATEGORY_SALOME" ) ); int obTab = pref->addPreference( tr( "PREF_TAB_OBJBROWSER" ), salomeCat ); int defCols = pref->addPreference( tr( "PREF_GROUP_DEF_COLUMNS" ), obTab ); - for ( int i = SalomeApp_DataObject::EntryId; i <= SalomeApp_DataObject::RefEntryId; i++ ) + for ( int i = SalomeApp_DataObject::EntryId; i < SalomeApp_DataObject::LastId; 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 ) ); @@ -1620,7 +1620,7 @@ bool SalomeApp_Application::useStudy( const QString& theName ) void SalomeApp_Application::objectBrowserColumnsVisibility() { if ( objectBrowser() ) - for ( int i = SalomeApp_DataObject::EntryId; i <= SalomeApp_DataObject::RefEntryId; i++ ) + for ( int i = SalomeApp_DataObject::EntryId; i < SalomeApp_DataObject::LastId; i++ ) { bool shown = resourceMgr()->booleanValue( "ObjectBrowser", QString( "visibility_column_id_%1" ).arg( i-1 ), true ); objectBrowser()->treeView()->setColumnHidden( i, !shown ); diff --git a/src/SalomeApp/SalomeApp_DataObject.h b/src/SalomeApp/SalomeApp_DataObject.h index 3d41c46f5..9e54b1734 100644 --- a/src/SalomeApp/SalomeApp_DataObject.h +++ b/src/SalomeApp/SalomeApp_DataObject.h @@ -39,7 +39,8 @@ public: //! Column id enum { ValueId = RefEntryId + 1, //!< value column - IORId //!< IOR column + IORId, //!< IOR column + LastId //!< indicates last Id value }; public: