From 9ca9b6f3e5fd197a5664d25fcb2ea940f78703d7 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Wed, 16 Oct 2019 17:08:39 +0800 Subject: [PATCH] Gui: fix SoFCSelection rendering when no shading --- src/Gui/SoFCSelection.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gui/SoFCSelection.cpp b/src/Gui/SoFCSelection.cpp index 83a7acd28c..35a5cc63b6 100644 --- a/src/Gui/SoFCSelection.cpp +++ b/src/Gui/SoFCSelection.cpp @@ -991,7 +991,9 @@ SoFCSelection::setOverride(SoGLRenderAction * action, SelContextPtr ctx) SoLazyElement::setEmissive(state, &ctx->highlightColor); SoOverrideElement::setEmissiveColorOverride(state, this, true); - if(mystyle == SoFCSelection::EMISSIVE_DIFFUSE) { + if(SoLazyElement::getLightModel(state)==SoLazyElement::BASE_COLOR + || mystyle == SoFCSelection::EMISSIVE_DIFFUSE) + { if(!preselected) SoLazyElement::setDiffuse(state, this,1, &ctx->selectionColor,&colorpacker); else