LightApp_Preferences::Bool, "ObjectBrowser", QString().sprintf( "visibility_column_%d", i ) );
}
pref->setItemProperty( defCols, "columns", 1 );
+
+ // adding preference to LightApp_Application handled preferences.. a bit of hacking with resources..
+ int genTab = pref->addPreference( LightApp_Application::tr( "PREF_TAB_GENERAL" ), salomeCat );
+ int studyGroup = pref->addPreference( LightApp_Application::tr( "PREF_GROUP_STUDY" ), genTab );
+ pref->addPreference( tr( "PREF_STORE_VISUAL_STATE" ), studyGroup, LightApp_Preferences::Bool, "Study", "store_visual_state" );
}
/*!Update desktop title.*/
#include "SalomeApp_Study.h"
#include "SalomeApp_Application.h"
+#include <SUIT_ResourceMgr.h>
#include <QtxWorkstack.h>
#include <STD_TabDesktop.h>
//================================================================
int SalomeApp_VisualState::storeState()
{
+ bool store = myApp->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
+ if ( !store )
+ return -1;
+
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
if ( !study )
return -1;
//================================================================
void SalomeApp_VisualState::restoreState(int savePoint)
{
+ bool store = myApp->resourceMgr()->booleanValue( "Study", "store_visual_state", true );
+ if ( !store )
+ return;
+
SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
if ( !study )
return;
<parameter name="font" value="Helvetic,12" />
</section>
<section name="Study">
- <parameter name="store_positions" value="false" />
+ <parameter name="store_positions" value="false" />
+ <parameter name="store_visual_state" value="false" />
</section>
<section name="GEOM">
<parameter name="name" value="Geometry"/>
msgid "SalomeApp_Application::MEN_DELETE_INVALID_REFERENCE"
msgstr "Delete Invalid Reference"
+msgid "SalomeApp_Application::PREF_STORE_VISUAL_STATE"
+msgstr "Store visual parameters"
+
//=======================================================================================
msgid "PUBLISH_IN_STUDY"