From fefe448915b42429158ae72cd23f7e95f48fced9 Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 3 Oct 2023 15:25:44 +0100 Subject: [PATCH] Fix an error --- src/SketchPlugin/SketchPlugin_Offset.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/SketchPlugin/SketchPlugin_Offset.cpp b/src/SketchPlugin/SketchPlugin_Offset.cpp index a32d1e835..119a7373b 100644 --- a/src/SketchPlugin/SketchPlugin_Offset.cpp +++ b/src/SketchPlugin/SketchPlugin_Offset.cpp @@ -81,13 +81,12 @@ void SketchPlugin_Offset::initAttributes() data()->addAttribute(REVERSED_ID(), ModelAPI_AttributeBoolean::typeId()); // #3 // SketchPlugin_Constraint::ENTITY_A() stores original entities + AttributeRefListPtr entaAttr = std::dynamic_pointer_cast + (data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), + ModelAPI_AttributeRefList::typeId())); // #4 bool badOrder = false; if (anEdgesAttr->isInitialized()) { // restoring data from saved study - AttributeRefListPtr entaAttr = std::dynamic_pointer_cast - (data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), - ModelAPI_AttributeRefList::typeId())); // #4 - badOrder = !entaAttr->isInitialized(); // we have not found AttributeRefList at 4th position, // so, we suppose a study with wrong order of offset attributes @@ -104,9 +103,10 @@ void SketchPlugin_Offset::initAttributes() ModelAPI_AttributeBoolean::typeId(), 4)); // #4 - data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), - ModelAPI_AttributeRefList::typeId(), - 5); // #5 + entaAttr = std::dynamic_pointer_cast + (data()->addAttribute(SketchPlugin_Constraint::ENTITY_A(), + ModelAPI_AttributeRefList::typeId(), + 5)); // #5 } // store offset entities -- 2.39.2