Skip to content
Permalink
Browse files
[composer] Fix loss of alpha value for attribute table grid color whe…
…n project saved and restored
  • Loading branch information
nyalldawson committed Jul 19, 2014
1 parent 111d7d3 commit 5cb356a4c16f5af3a27dd14d4023e0677e6dfbed
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/core/composer/qgscomposertable.cpp
@@ -248,6 +248,7 @@ bool QgsComposerTable::tableWriteXML( QDomElement& elem, QDomDocument & doc ) co
elem.setAttribute( "gridColorRed", mGridColor.red() );
elem.setAttribute( "gridColorGreen", mGridColor.green() );
elem.setAttribute( "gridColorBlue", mGridColor.blue() );
elem.setAttribute( "gridColorAlpha", mGridColor.alpha() );
elem.setAttribute( "showGrid", mShowGrid );

//columns
@@ -282,7 +283,8 @@ bool QgsComposerTable::tableReadXML( const QDomElement& itemElem, const QDomDocu
int gridRed = itemElem.attribute( "gridColorRed", "0" ).toInt();
int gridGreen = itemElem.attribute( "gridColorGreen", "0" ).toInt();
int gridBlue = itemElem.attribute( "gridColorBlue", "0" ).toInt();
mGridColor = QColor( gridRed, gridGreen, gridBlue );
int gridAlpha = itemElem.attribute( "gridColorAlpha", "255" ).toInt();
mGridColor = QColor( gridRed, gridGreen, gridBlue, gridAlpha );

//restore column specifications
qDeleteAll( mColumns );

0 comments on commit 5cb356a

Please sign in to comment.