_PTR(AttributeParameter) SALOMEDS_Study::GetCommonParameters(const string& theID, int theSavePoint)
{
SALOMEDSClient_AttributeParameter* AP = NULL;
- if (_isLocal) {
- SALOMEDS::Locker lock;
- AP = new SALOMEDS_AttributeParameter(_local_impl->GetCommonParameters(theID.c_str(), theSavePoint));
- }
- else {
- AP = new SALOMEDS_AttributeParameter(_corba_impl->GetCommonParameters(theID.c_str(), theSavePoint));
+ if(theSavePoint > 0) {
+ if (_isLocal) {
+ SALOMEDS::Locker lock;
+ AP = new SALOMEDS_AttributeParameter(_local_impl->GetCommonParameters(theID.c_str(), theSavePoint));
+ }
+ else {
+ AP = new SALOMEDS_AttributeParameter(_corba_impl->GetCommonParameters(theID.c_str(), theSavePoint));
+ }
}
-
return _PTR(AttributeParameter)(AP);
}
const string& theModuleName, int theSavePoint)
{
SALOMEDSClient_AttributeParameter* AP = NULL;
- if (_isLocal) {
- SALOMEDS::Locker lock;
- AP = new SALOMEDS_AttributeParameter(_local_impl->GetModuleParameters(theID.c_str(), theModuleName.c_str(), theSavePoint));
- }
- else {
- AP = new SALOMEDS_AttributeParameter(_corba_impl->GetModuleParameters(theID.c_str(), theModuleName.c_str(), theSavePoint));
+ if(theSavePoint > 0) {
+ if (_isLocal) {
+ SALOMEDS::Locker lock;
+ AP = new SALOMEDS_AttributeParameter(_local_impl->GetModuleParameters(theID.c_str(), theModuleName.c_str(), theSavePoint));
+ }
+ else {
+ AP = new SALOMEDS_AttributeParameter(_corba_impl->GetModuleParameters(theID.c_str(), theModuleName.c_str(), theSavePoint));
+ }
}
-
return _PTR(AttributeParameter)(AP);
}
fp << aScriptName << ".RebuildData(" << aBatchModeScript << ".myStudy)" << endl;
}
+ if(thePrefix.Length() > 0) { //Output the call to Session's method restoreVisualState
+ fp << "iparameters.getSession().restoreVisualState(1)" << endl;
+ }
+
fp << "salome.sg.updateObjBrowser(1)" << endl;
fp.close();
//============================================================================
Handle(SALOMEDSImpl_AttributeParameter) SALOMEDSImpl_Study::GetCommonParameters(const char* theID, int theSavePoint)
{
+ if(theSavePoint <= 0) return NULL;
Handle(SALOMEDSImpl_StudyBuilder) builder = NewBuilder();
Handle(SALOMEDSImpl_SObject) so = FindComponent((char*)theID);
if(so.IsNull()) so = builder->NewComponent((char*)theID);
const char* theModuleName,
int theSavePoint)
{
+ if(theSavePoint <= 0) return NULL;
Handle(SALOMEDSImpl_AttributeParameter) main_ap = GetCommonParameters(theID, theSavePoint);
Handle(SALOMEDSImpl_SObject) main_so = main_ap->GetSObject();
Handle(SALOMEDSImpl_AttributeParameter) par;