From: mpv Date: Wed, 15 Jul 2020 18:05:26 +0000 (+0300) Subject: Fix for the problem of import Part crash when sketch with removed sketch elements. X-Git-Tag: V9_6_0a1~55 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da0145636404e35f6b8ab1b35f20645eddab4c3b;p=modules%2Fshaper.git Fix for the problem of import Part crash when sketch with removed sketch elements. --- diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 7d9dabeae..6046533ab 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -388,6 +388,10 @@ bool Model_Document::importPart(const char* theFileName, if (isOk && !theCheckOnly) { // copy features from the temporary document to the current Handle(TDF_RelocationTable) aRelocTable = new TDF_RelocationTable(); + // add to relocation table source root label to the destination label because + // sometimes there could be a reference to root (issue 3267 on import part + // with sketch with removed features) + aRelocTable->SetRelocation(aTempDoc->Main().Root(), myDoc->Main().Root()); TDF_LabelList anAllNewFeatures; // Perform the copying twice for correct references: // 1. copy labels hierarchy and fill the relocation table