mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 02:00:34 +05:00
In dump script avoid removing missing geom objects
This commit is contained in:
parent
c85f79dfca
commit
eac64fdf48
@ -1080,10 +1080,15 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
|||||||
TCollection_AsciiString anUpdatedScript;
|
TCollection_AsciiString anUpdatedScript;
|
||||||
|
|
||||||
Resource_DataMapOfAsciiStringAsciiString mapRemoved;
|
Resource_DataMapOfAsciiStringAsciiString mapRemoved;
|
||||||
Resource_DataMapOfAsciiStringAsciiString mapEntries; // names and entries present in anUpdatedScript
|
Resource_DataMapOfAsciiStringAsciiString mapEntries; // { entry: name } present in anUpdatedScript
|
||||||
Standard_Integer objectCounter = 0;
|
Standard_Integer objectCounter = 0;
|
||||||
TCollection_AsciiString anEntry, aName, aGUIName, aBaseName("smeshObj_");
|
TCollection_AsciiString anEntry, aName, aGUIName, aBaseName("smeshObj_");
|
||||||
|
|
||||||
|
std::string compDataType = ComponentDataType(); // SMESH module's data type
|
||||||
|
SALOMEDS::SComponent_var smeshSO = getStudyServant()->FindComponent( compDataType.c_str() );
|
||||||
|
CORBA::String_var smeshID = smeshSO->GetID();
|
||||||
|
TCollection_AsciiString smeshEntry = smeshID.in();
|
||||||
|
|
||||||
// Treat every script line and add it to anUpdatedScript
|
// Treat every script line and add it to anUpdatedScript
|
||||||
for ( linesIt = lines.begin(); linesIt != lines.end(); ++linesIt )
|
for ( linesIt = lines.begin(); linesIt != lines.end(); ++linesIt )
|
||||||
{
|
{
|
||||||
@ -1134,6 +1139,12 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
|||||||
mapEntries.Bind(anEntry, aName);
|
mapEntries.Bind(anEntry, aName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if ( !anEntry.StartsWith( smeshEntry )) // not SMESH object
|
||||||
|
{
|
||||||
|
aName = SMESH::TPythonDump::NotPublishedObjectName();
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Removed Object
|
// Removed Object
|
||||||
do {
|
do {
|
||||||
@ -1145,6 +1156,7 @@ TCollection_AsciiString SMESH_Gen_i::DumpPython_impl
|
|||||||
|
|
||||||
theObjectNames.Bind(anEntry, aName);
|
theObjectNames.Bind(anEntry, aName);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
theObjectNames.Bind(aName, anEntry); // to detect same name of diff objects
|
theObjectNames.Bind(aName, anEntry); // to detect same name of diff objects
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user