Skip to content

Commit

Permalink
When mapping color for rendering highlighted (identified) features,
Browse files Browse the repository at this point in the history
don't allow pixels which were previously non-transparent to become
totally transparent.

This can result in invisible highlights for very transparent symbols.

Fixes #54830
  • Loading branch information
nyalldawson committed Oct 9, 2023
1 parent fe1d167 commit b36e555
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgshighlight.cpp
Expand Up @@ -393,7 +393,7 @@ void QgsHighlight::paint( QPainter *p )
if ( alpha > 0 )
{
int green = qGreen( line[c] );
line[c] = qRgba( penRed, penGreen, penBlue, std::clamp( static_cast< int >( alpha - ( green * k ) ), 0, 255 ) );
line[c] = qRgba( penRed, penGreen, penBlue, std::clamp( static_cast< int >( alpha - ( green * k ) ), 30, 255 ) );
}
}
}
Expand Down

0 comments on commit b36e555

Please sign in to comment.