From 1b886ef961671ff898e9cd5dd1870d4b91d0bbd9 Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Fri, 28 Nov 2025 21:00:16 -0600 Subject: [PATCH] Revert "GUI: fix "select all instances" (#25503)" This reverts commit 6b608673688275c4ddf64fb2a37e86a9a61fd87a. --- src/Gui/Tree.cpp | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index ba66ba0714..05a5d5955e 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -6539,37 +6539,20 @@ int DocumentObjectItem::getSubName(std::ostringstream& str, App::DocumentObject* int group = parent->isGroup(); if (group == NotGroup) { if (ret != PartGroup) { - // check if the parent explicitly claims this child, - // if so, we should include the parent in the subname path - auto children = parent->object()->claimChildren(); - bool parentClaimsThis = false; - for (auto child : children) { - if (child == object()->getObject()) { - parentClaimsThis = true; - break; - } - } - - if (!parentClaimsThis) { - // Handle this situation, - // - // LinkGroup - // |--PartExtrude - // |--Sketch - // - // This function traverse from top down, so, when seeing a - // non-group object 'PartExtrude', its following children should - // not be grouped, so must reset any previous parents here. - topParent = nullptr; - str.str(""); // reset the current subname - return NotGroup; - } - // if parent claims this child, treat it like a PartGroup - group = PartGroup; - } - else { - group = PartGroup; + // Handle this situation, + // + // LinkGroup + // |--PartExtrude + // |--Sketch + // + // This function traverse from top down, so, when seeing a + // non-group object 'PartExtrude', its following children should + // not be grouped, so must reset any previous parents here. + topParent = nullptr; + str.str(""); // reset the current subname + return NotGroup; } + group = PartGroup; } ret = group; }