Gui: fix SoFCSelection rendering when no shading

This commit is contained in:
Zheng, Lei
2019-10-16 17:08:39 +08:00
committed by wmayer
parent 0d76efdb16
commit ac3ed6aed2

View File

@@ -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