Correctly build reference from selection subname

This commit is contained in:
bgbsww
2024-09-22 07:52:13 -04:00
parent 86fa65ba48
commit f0053e5388
3 changed files with 39 additions and 14 deletions

View File

@@ -272,7 +272,7 @@ void PropertyLinkBase::_registerElementReference(App::DocumentObject *obj, std::
return;
}
if (shadow.newName.empty()) {
_updateElementReference(0, obj, sub, shadow, false);
_updateElementReference(nullptr, obj, sub, shadow, false);
return;
}
GeoFeature* geo = nullptr;
@@ -283,7 +283,7 @@ void PropertyLinkBase::_registerElementReference(App::DocumentObject *obj, std::
elementName,
true,
GeoFeature::ElementNameType::Export,
0,
nullptr,
&element,
&geo);
if (!geo || !element || !element[0]) {