the SALOME platform.
- <b>ASCII save</b> - if checked in, your study will be saved in
ASCII format file (or files).
+ - <b>Automatic loading of light modules when opening study</b> - if checked in,
+ Light Modules of the current study will be automatically loaded at the next study
+ opening, allowing completion of object browser.
- <b>Store positions of windows</b> - if checked in, positions of windows
will be saved in a special file at the end of the current session and
then restored for a new session.
// .... -> ascii save mode
pref->addPreference( tr( "PREF_ASCII_FILE" ), studyGroup, LightApp_Preferences::Bool, "Study", "ascii_file" );
// .... -> store windows geometry
+ pref->addPreference( tr( "PREF_LOAD_LIGHT" ), studyGroup, LightApp_Preferences::Bool, "Study", "autoload_light_modules" );
pref->addPreference( tr( "PREF_STORE_POS" ), studyGroup, LightApp_Preferences::Bool, "Study", "store_positions" );
pref->addPreference( "", studyGroup, LightApp_Preferences::Space );
pref->addPreference( tr( "PREF_STORE_TOOL_POS" ), studyGroup, LightApp_Preferences::Bool, "Study", "store_tool_positions" );
</section>
<section name="Study">
<!-- General study settings -->
+ <parameter name="autoload_light_modules" value="true" />
<parameter name="store_positions" value="true" />
<parameter name="store_tool_positions" value="true" />
<parameter name="auto_save_interval" value="0" />
<source>PREF_GROUP_VTKVIEWER</source>
<translation>VTK 3D Viewer</translation>
</message>
+ <message>
+ <source>PREF_LOAD_LIGHT</source>
+ <translation>Automatic loading of light modules when opening study</translation>
+ </message>
<message>
<source>PREF_STORE_POS</source>
<translation>Store positions of windows</translation>
<source>PREF_GROUP_VTKVIEWER</source>
<translation>Scène VTK 3D</translation>
</message>
+ <message>
+ <source>PREF_LOAD_LIGHT</source>
+ <translation>Chargement automatique des modules Light à l'ouverture d'étude</translation>
+ </message>
<message>
<source>PREF_STORE_POS</source>
<translation>Enregistrer la position des fenêtres</translation>
<source>PREF_GROUP_VTKVIEWER</source>
<translation>VTK 3D Viewer</translation>
</message>
+ <message>
+ <source>PREF_LOAD_LIGHT</source>
+ <translation>Automatic loading of light modules when opening study</translation>
+ </message>
<message>
<source>PREF_STORE_POS</source>
<translation>ウィンドウの位置を保存</translation>
#include "SalomeApp_Study.h"
#include "SalomeApp_Application.h"
-//#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_ResourceMgr.h>
#include <SUIT_ViewManager.h>
#include <SUIT_ViewWindow.h>
#include <QtxWorkstack.h>
myApp->modules( mlist );
QListIterator<CAM_Module*> itM( mlist );
CAM_Module* module = 0;
+ SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
+ bool loadLight = aResMgr->booleanValue( "Study", "autoload_light_modules", true );
+
while ( itM.hasNext() ) {
module = itM.next();
if ( !module ) continue;
if ( LightApp_Module* lModule = dynamic_cast<LightApp_Module*>( module ) ) {
- ip->append( "AP_MODULES_LIST", lModule->moduleName().toStdString() );
+ if (loadLight)
+ ip->append( "AP_MODULES_LIST", lModule->moduleName().toStdString() );
if ( SalomeApp_Module* sModule = dynamic_cast<SalomeApp_Module*>( module ) )
sModule->storeVisualParameters( savePoint );
}
</section>
<section name="Study">
<!-- General study settings -->
+ <parameter name="autoload_light_modules" value="true" />
<parameter name="store_positions" value="true" />
<parameter name="store_tool_positions" value="true" />
<parameter name="store_visual_state" value="false" />