Core/Gui: Render primitives on top of the scene in PickGeometry

+ added some better grouping for items, which are assigned per object
  right now. For example, if we exceed 10 items per object it gets an
  additional group.

Co-authored-by: realthunder <realthunder@users.noreply.github.com>
This commit is contained in:
tetektoza
2025-06-25 11:28:25 +02:00
parent 5e0b74dce6
commit edfeff975e
17 changed files with 614 additions and 91 deletions

View File

@@ -4036,7 +4036,15 @@ void StdCmdPickGeometry::activated(int iMsg)
if (!obj)
continue;
// Get element information - handle sub-objects like Assembly parts
std::string elementName = vp->getElement(pp->getDetail());
std::string subName;
// Try to get more detailed sub-object information
bool hasSubObject = false;
if (vp->getElementPicked(pp, subName)) {
hasSubObject = true;
}
// Create PickData with selection information
PickData pickData;
@@ -4044,7 +4052,7 @@ void StdCmdPickGeometry::activated(int iMsg)
pickData.element = elementName;
pickData.docName = obj->getDocument()->getName();
pickData.objName = obj->getNameInDocument();
pickData.subName = elementName;
pickData.subName = hasSubObject ? subName : elementName;
selections.push_back(pickData);
}