Package: qgis / 2.4.0-1

0001-composer-Fix-loss-of-alpha-value-for-attribute-table.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 5cb356a4c16f5af3a27dd14d4023e0677e6dfbed Mon Sep 17 00:00:00 2001
From: Nyall Dawson <nyall.dawson@gmail.com>
Date: Sat, 19 Jul 2014 22:46:10 +1000
Subject: [composer] Fix loss of alpha value for attribute table grid color
 when project saved and restored
Origin: https://github.com/qgis/QGIS/commit/5cb356a4c16f5af3a27dd14d4023e0677e6dfbed


--- a/src/core/composer/qgscomposertable.cpp
+++ b/src/core/composer/qgscomposertable.cpp
@@ -248,6 +248,7 @@ bool QgsComposerTable::tableWriteXML( QD
   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( con
   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 );