Sketcher: Carbon Copy enable checks when not in a body

This commit is contained in:
Abdullah Tahiri
2017-04-10 14:25:38 +02:00
committed by wmayer
parent 7463aa7efd
commit 7818f1f08b

View File

@@ -2046,12 +2046,12 @@ bool SketchObject::isCarbonCopyAllowed(App::Document *pDoc, App::DocumentObject
App::Part* part_this = App::Part::getPartOfObject(this, true);
App::Part* part_obj = App::Part::getPartOfObject(pObj, true);
if (part_this == part_obj){ //either in the same part, or in the root of document
if (body_this == NULL) {
return true;
} else if (body_this != body_obj) {
if (rsn)
*rsn = rlOtherBody;
return false;
if (body_this != NULL) {
if (body_this != body_obj) {
if (rsn)
*rsn = rlOtherBody;
return false;
}
}
} else {
// cross-part link. Disallow, should be done via shapebinders only