From b36e555e685cb4347955f6042e67fd4ddf174664 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 6 Oct 2023 13:41:05 +1000 Subject: [PATCH] When mapping color for rendering highlighted (identified) features, 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 --- src/gui/qgshighlight.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/qgshighlight.cpp b/src/gui/qgshighlight.cpp index ed1fa1c45dcb..23fd06825330 100644 --- a/src/gui/qgshighlight.cpp +++ b/src/gui/qgshighlight.cpp @@ -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 ) ); } } }