Skip to content

Commit a531626

Browse files
committed
Do not apply diagram transparency to pen
but instead save custom pen alpha value
1 parent 55b5dcb commit a531626

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/qgsdiagramrendererv2.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ void QgsDiagramSettings::readXML( const QDomElement& elem )
5454
size.setHeight( elem.attribute( "height" ).toDouble() );
5555
transparency = elem.attribute( "transparency", "0" ).toInt();
5656
penColor.setNamedColor( elem.attribute( "penColor" ) );
57-
penColor.setAlpha( 255 - transparency );
57+
int penAlpha = elem.attribute( "penAlpha", "255" ).toInt();
58+
penColor.setAlpha( penAlpha );
5859
penWidth = elem.attribute( "penWidth" ).toDouble();
60+
5961
minScaleDenominator = elem.attribute( "minScaleDenominator", "-1" ).toDouble();
6062
maxScaleDenominator = elem.attribute( "maxScaleDenominator", "-1" ).toDouble();
6163

@@ -141,6 +143,7 @@ void QgsDiagramSettings::writeXML( QDomElement& rendererElem, QDomDocument& doc
141143
categoryElem.setAttribute( "width", QString::number( size.width() ) );
142144
categoryElem.setAttribute( "height", QString::number( size.height() ) );
143145
categoryElem.setAttribute( "penColor", penColor.name() );
146+
categoryElem.setAttribute( "penAlpha", penColor.alpha() );
144147
categoryElem.setAttribute( "penWidth", QString::number( penWidth ) );
145148
categoryElem.setAttribute( "minScaleDenominator", QString::number( minScaleDenominator ) );
146149
categoryElem.setAttribute( "maxScaleDenominator", QString::number( maxScaleDenominator ) );

0 commit comments

Comments
 (0)