Only adjust found element names

This commit is contained in:
bgbsww
2024-06-20 09:23:35 -04:00
committed by Chris Hennes
parent 2f8382ae59
commit 9b547bb90f
2 changed files with 8 additions and 4 deletions

View File

@@ -400,8 +400,10 @@ void SoFCUnifiedSelection::doAction(SoAction *action)
auto subName = selaction->SelChange.pSubName;
#ifdef FC_USE_TNP_FIX
std::pair<std::string, std::string> elementName;
App::GeoFeature::resolveElement(obj,subName,elementName);
subName = elementName.second.c_str(); // Use the shortened element name not the full one.
App::GeoFeature::resolveElement(obj, subName, elementName);
if (!elementName.second.empty()) { // If we have a shortened element name
subName = elementName.second.c_str(); // use it.
}
#endif
if(!selaction->SelChange.pSubName || !selaction->SelChange.pSubName[0] ||
vp->getDetailPath(subName,detailPath,true,detail))

View File

@@ -116,8 +116,10 @@ void View3DInventorSelection::checkGroupOnTop(const SelectionChanges &Reason)
auto subname = Reason.pSubName;
#ifdef FC_USE_TNP_FIX
std::pair<std::string, std::string> element;
App::GeoFeature::resolveElement(obj,Reason.pSubName,element);
subname = element.second.c_str();
App::GeoFeature::resolveElement(obj, Reason.pSubName, element);
if (!element.second.empty()) { // If we have a shortened element name
subname = element.second.c_str(); // use if
}
#endif
if(subname)
key += subname;