Skip to content

Commit cb135e9

Browse files
committed
[gui] improve no color logic by keeping RGB values
(cherry-picked from 64823d1)
1 parent 71308c7 commit cb135e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gui/qgscolorbuttonv2.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ void QgsColorButtonV2::setToNoColor()
159159
{
160160
if ( mAllowAlpha )
161161
{
162-
setColor( QColor( 0, 0, 0, 0 ) );
162+
QColor noColor = QColor( mColor );
163+
noColor.setAlpha( 0 );
164+
setColor( noColor );
163165
}
164166
}
165167

0 commit comments

Comments
 (0)