Skip to content

Commit

Permalink
[composer] Fix loss of alpha value for attribute table grid color whe…
Browse files Browse the repository at this point in the history
…n project saved and restored
  • Loading branch information
nyalldawson committed Jul 19, 2014
1 parent 111d7d3 commit 5cb356a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/composer/qgscomposertable.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 5cb356a

Please sign in to comment.