From: nds Date: Thu, 15 Feb 2018 08:05:25 +0000 (+0300) Subject: Issue #2440 Can't validate coincidence between a line and an imported line X-Git-Tag: V_3.0.0~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ef3b583309df4b9d0593c7abd181ab9d6fed42e;p=modules%2Fshaper.git Issue #2440 Can't validate coincidence between a line and an imported line Coincidence to exported line will create invalid projection feature which does not allow validating of the sketch. The projection should be removed. --- diff --git a/src/PartSet/PartSet_Tools.cpp b/src/PartSet/PartSet_Tools.cpp index 4430699bb..4d00067fe 100755 --- a/src/PartSet/PartSet_Tools.cpp +++ b/src/PartSet/PartSet_Tools.cpp @@ -374,7 +374,13 @@ ResultPtr PartSet_Tools::createFixedObjectByExternal( AttributeRefAttrPtr aRefAttr = aProjectionFeature->data()->refattr( SketchPlugin_Projection::PROJECTED_FEATURE_ID()); if (!aRefAttr || !aRefAttr->isInitialized()) + { + // remove external feature if the attribute is not filled + std::set aFeatures; + aFeatures.insert(aProjectionFeature); + ModelAPI_Tools::removeFeaturesAndReferences(aFeatures); return ResultPtr(); + } FeaturePtr aProjection = ModelAPI_Feature::feature(aRefAttr->object()); if (aProjection.get() && aProjection->lastResult().get()) diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index db264ad2b..4ff214d08 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1923,7 +1923,6 @@ void XGUI_Workshop::moveObjects() //************************************************************** bool XGUI_Workshop::deleteFeatures(const QObjectPtrList& theObjects) { - std::map > aReferences; std::set aFeatures; ModuleBase_Tools::convertToFeatures(theObjects, aFeatures);