diff --git a/src/App/Link.cpp b/src/App/Link.cpp index 9b21fc0441..6702bb4734 100644 --- a/src/App/Link.cpp +++ b/src/App/Link.cpp @@ -626,7 +626,7 @@ bool LinkBaseExtension::extensionGetSubObject(DocumentObject *&ret, const char * if(mat) *mat *= getTransform(transform); - DocumentObject *element = 0; + //DocumentObject *element = 0; bool isElement = false; int idx = getElementIndex(subname,&subname); if(idx>=0) { @@ -671,11 +671,15 @@ bool LinkBaseExtension::extensionGetSubObject(DocumentObject *&ret, const char * if(subname && !Data::ComplexGeoData::isMappedElement(subname) && strchr(subname,'.')) { if(mat) *mat = matNext; - }else if(element) - ret = element; + } + // This is a useless check as 'element' is never set to a value other than null + //else if(element) { + // ret = element; + //} else if(!isElement) { ret = const_cast(obj); - } else { + } + else { if(idx) { postfix = Data::ComplexGeoData::indexPostfix(); postfix += std::to_string(idx);