Skip to content

Commit 5cb356a

Browse files
committedJul 19, 2014
[composer] Fix loss of alpha value for attribute table grid color when project saved and restored
1 parent 111d7d3 commit 5cb356a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/core/composer/qgscomposertable.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ bool QgsComposerTable::tableWriteXML( QDomElement& elem, QDomDocument & doc ) co
248248
elem.setAttribute( "gridColorRed", mGridColor.red() );
249249
elem.setAttribute( "gridColorGreen", mGridColor.green() );
250250
elem.setAttribute( "gridColorBlue", mGridColor.blue() );
251+
elem.setAttribute( "gridColorAlpha", mGridColor.alpha() );
251252
elem.setAttribute( "showGrid", mShowGrid );
252253

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

287289
//restore column specifications
288290
qDeleteAll( mColumns );

0 commit comments

Comments
 (0)
Please sign in to comment.