isUpdated = update(*anAttrIt) || isUpdated;
// check external attribute is changed
- bool isExternal = aSketchFeature && aSketchFeature->isExternal();
+ bool isExternal = aSketchFeature &&
+ (aSketchFeature->isExternal() || isCopyFeature(aSketchFeature));
if (aRelated && isExternal != aRelated->isExternal()) {
if (isExternal)
makeExternal(aRelated);
theSketch->attribute(SketchPlugin_Sketch::DIRX_ID()));
isChanged = isChanged
- || (mySketchOrigin && anOrigin->pnt()->distance(mySketchOrigin) > THE_TOLERANCE)
- || (mySketchNormal && aNorm->xyz()->distance(mySketchNormal->xyz()) > THE_TOLERANCE)
- || (mySketchXDir && aDirX->xyz()->distance(mySketchXDir->xyz()) > THE_TOLERANCE);
+ || (mySketchOrigin && anOrigin && anOrigin->pnt()->distance(mySketchOrigin) > THE_TOLERANCE)
+ || (mySketchNormal && aNorm && aNorm->xyz()->distance(mySketchNormal->xyz()) > THE_TOLERANCE)
+ || (mySketchXDir && aDirX && aDirX->xyz()->distance(mySketchXDir->xyz()) > THE_TOLERANCE);
if (isChanged) {
mySketch = theSketch;