From 233470155d22a0daee38a5182ffdea9f6732cb3d Mon Sep 17 00:00:00 2001 From: tetektoza Date: Fri, 5 Sep 2025 02:09:40 +0200 Subject: [PATCH] Gui: Break up condition for Clarify Selection to separate variables --- src/Mod/Part/Gui/SoBrepEdgeSet.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp index 0f2345d2eb..88e1fedf23 100644 --- a/src/Mod/Part/Gui/SoBrepEdgeSet.cpp +++ b/src/Mod/Part/Gui/SoBrepEdgeSet.cpp @@ -89,16 +89,20 @@ void SoBrepEdgeSet::GLRender(SoGLRenderAction *action) return; - if (Gui::Selection() - .isClarifySelectionActive() && !Gui::SoDelayedAnnotationsElement::isProcessingDelayedPaths - && ((ctx && !ctx->hl.empty()) || viewProvider->isFaceHighlightActive())) { - // if we are using clarifyselection - add this to delayed paths with priority - // as we want to get this rendered on top of everything - viewProvider->setFaceHighlightActive(true); - Gui::SoDelayedAnnotationsElement::addDelayedPath(action->getState(), - action->getCurPath()->copy(), - 200); - return; + bool hasContextHighlight = ctx && !ctx->hl.empty(); + bool hasFaceHighlight = viewProvider->isFaceHighlightActive(); + bool hasAnyHighlight = hasContextHighlight || hasFaceHighlight; + + if (Gui::Selection().isClarifySelectionActive() + && !Gui::SoDelayedAnnotationsElement::isProcessingDelayedPaths + && hasAnyHighlight) { + // if we are using clarifyselection - add this to delayed paths with priority + // as we want to get this rendered on top of everything + viewProvider->setFaceHighlightActive(true); + Gui::SoDelayedAnnotationsElement::addDelayedPath(action->getState(), + action->getCurPath()->copy(), + 200); + return; } if(selContext2->checkGlobal(ctx)) {