Sketcher: Restore inter-body expression engine links in Carbon Copy

This commit is contained in:
Abdullah Tahiri
2017-11-02 19:52:26 +01:00
parent f8ed890db0
commit bfa6de056e
3 changed files with 16 additions and 3 deletions

View File

@@ -99,6 +99,7 @@ SketchObject::SketchObject()
ADD_PROPERTY_TYPE(Constraints, (0) ,"Sketch",(App::PropertyType)(App::Prop_None),"Sketch constraints");
ADD_PROPERTY_TYPE(ExternalGeometry,(0,0),"Sketch",(App::PropertyType)(App::Prop_None),"Sketch external geometry");
allowOtherBody = true;
allowUnaligned = true;
for (std::vector<Part::Geometry *>::iterator it=ExternalGeo.begin(); it != ExternalGeo.end(); ++it)
@@ -2090,14 +2091,14 @@ bool SketchObject::isCarbonCopyAllowed(App::Document *pDoc, App::DocumentObject
App::Part* part_obj = App::Part::getPartOfObject(pObj);
if (part_this == part_obj){ //either in the same part, or in the root of document
if (body_this != NULL) {
if (body_this != body_obj) {
if ((body_this != body_obj) && !this->allowOtherBody) {
if (rsn)
*rsn = rlOtherBody;
return false;
}
}
} else {
// cross-part link. Disallow, should be done via shapebinders only
// cross-part relation. Disallow, should be done via shapebinders only
if (rsn)
*rsn = rlOtherPart;
return false;