mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-14 02:30:33 +05:00
Fix mixed Python dump of a new and a closed study
This commit is contained in:
parent
a8d98187a5
commit
35012b0a3d
@ -4971,6 +4971,9 @@ void SMESH_Gen_i::Close( SALOMEDS::SComponent_ptr theComponent )
|
|||||||
// remove the tmp files meshes are loaded from
|
// remove the tmp files meshes are loaded from
|
||||||
SMESH_PreMeshInfo::RemoveStudyFiles_TMP_METHOD( theComponent );
|
SMESH_PreMeshInfo::RemoveStudyFiles_TMP_METHOD( theComponent );
|
||||||
|
|
||||||
|
// Clean trace of API methods calls
|
||||||
|
CleanPythonTrace();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -678,7 +678,6 @@ namespace SMESH
|
|||||||
cout << "Exception in SMESH_Gen_i::DumpPython(): " << text << endl;
|
cout << "Exception in SMESH_Gen_i::DumpPython(): " << text << endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : RemoveTabulation
|
//function : RemoveTabulation
|
||||||
@ -698,6 +697,7 @@ void RemoveTabulation( TCollection_AsciiString& theScript )
|
|||||||
}
|
}
|
||||||
theScript = aString.c_str();
|
theScript = aString.c_str();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : DumpPython
|
//function : DumpPython
|
||||||
@ -995,10 +995,9 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
|||||||
std::list< TCollection_AsciiString > lines; // lines of a script
|
std::list< TCollection_AsciiString > lines; // lines of a script
|
||||||
std::list< TCollection_AsciiString >::iterator linesIt;
|
std::list< TCollection_AsciiString >::iterator linesIt;
|
||||||
|
|
||||||
if ( isPublished )
|
|
||||||
lines.push_back( aSMESHGen + " = smeshBuilder.New()" );
|
lines.push_back( aSMESHGen + " = smeshBuilder.New()" );
|
||||||
else
|
if ( !isPublished )
|
||||||
lines.push_back( aSMESHGen + " = smeshBuilder.New(False)" );
|
lines.push_back( aSMESHGen + ".SetEnablePublish( False )" );
|
||||||
lines.push_back( helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()" );
|
lines.push_back( helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()" );
|
||||||
lines.push_back( helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()" );
|
lines.push_back( helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()" );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user