From 674f0de7ce07c09a1de2744cd914ada3033e24a5 Mon Sep 17 00:00:00 2001 From: Konstantin Leontev Date: Thu, 11 Jul 2024 12:11:28 +0100 Subject: [PATCH] [bos #38044][EDF] (2023-T3) Support for automatic reparation. Result of ImportBREP() now published right away to keep proper linkage with possible child objects. --- src/GEOM/GEOM_Engine.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx index e26f2139b..2b2d4b269 100644 --- a/src/GEOM/GEOM_Engine.cxx +++ b/src/GEOM/GEOM_Engine.cxx @@ -1261,12 +1261,15 @@ bool ProcessFunction(Handle(GEOM_Function)& theFunction, // 0020001 PTv, check for critical functions, which require dump of objects if (theIsPublished) { - // currently, there is only one function "RestoreGivenSubShapes", - // later this check could be replaced by iterations on list of such functions - if (aDescr.Search( "RestoreGivenSubShapes" ) != -1) - theIsDumpCollected = true; - else if (aDescr.Search( "RestoreSubShapes" ) != -1) + if (aDescr.Search("RestoreGivenSubShapes") != -1 || + aDescr.Search("RestoreSubShapes") != -1 || + // Publish right after import, to prevent broken linkage with possible child objects. + // If we create a group of sub-objects from an imported brep before the source was published, + // the group will be displayed as unrelated to a source in the Salome object browser. + aDescr.Search("ImportBREP") != -1) + { theIsDumpCollected = true; + } } //Replace parameter by notebook variables -- 2.39.2