mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-16 08:03:08 +05:00
0021672: [CEA 565] Dump Study from script
Avoid repeated SubShape...() command
This commit is contained in:
parent
5ac53b11a1
commit
55e32b8599
@ -219,7 +219,7 @@ void GEOM_Engine::SetEngine(GEOM_Engine* theEngine) { TheEngine = theEngine; }
|
|||||||
GEOM_Engine::GEOM_Engine()
|
GEOM_Engine::GEOM_Engine()
|
||||||
{
|
{
|
||||||
TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver());
|
TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver());
|
||||||
|
|
||||||
_OCAFApp = new GEOM_Application();
|
_OCAFApp = new GEOM_Application();
|
||||||
_UndoLimit = 10;
|
_UndoLimit = 10;
|
||||||
}
|
}
|
||||||
@ -671,7 +671,15 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
|
|||||||
continue;
|
continue;
|
||||||
// add function description before dump
|
// add function description before dump
|
||||||
if (!aCurScript.IsEmpty())
|
if (!aCurScript.IsEmpty())
|
||||||
|
{
|
||||||
|
if ( aFunction->GetDriverGUID() == GEOM_Object::GetSubShapeID() )
|
||||||
|
// avoid repeated SubShape...() command at the end
|
||||||
|
if (aFuncScript.Location( aCurScript,
|
||||||
|
aFuncScript.Length() - aCurScript.Length(),
|
||||||
|
aFuncScript.Length()))
|
||||||
|
continue;
|
||||||
aFuncScript += aCurScript;
|
aFuncScript += aCurScript;
|
||||||
|
}
|
||||||
if (isDumpCollected ) {
|
if (isDumpCollected ) {
|
||||||
// Replace entries by the names
|
// Replace entries by the names
|
||||||
ReplaceEntriesByNames( aFuncScript, aEntry2ObjData, isPublished,
|
ReplaceEntriesByNames( aFuncScript, aEntry2ObjData, isPublished,
|
||||||
|
Loading…
Reference in New Issue
Block a user