[qgis] 01/04: Add patches from upstream release-2_6 branch.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Thu Feb 5 23:01:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository qgis.

commit 2159c280747bfb56e440a8e89a77824b1990257c
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Feb 5 21:56:41 2015 +0100

    Add patches from upstream release-2_6 branch.
---
 debian/changelog                                   |  1 +
 ...er-BUGFIX-GetLegendGraphics-set-layername.patch | 53 ++++++++++++++++++++++
 ...o-not-call-activateLayerRelatedAction-aft.patch | 26 +++++++++++
 debian/patches/series                              |  2 +
 4 files changed, 82 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 72225e8..e953972 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 qgis (2.6.1-1~exp2) UNRELEASED; urgency=medium
 
   * Update Vcs-Browser URL to use cgit instead of gitweb.
+  * Add patches from upstream release-2_6 branch.
 
  -- Bas Couwenberg <sebastic at xs4all.nl>  Sat, 10 Jan 2015 15:21:43 +0100
 
diff --git a/debian/patches/0001-QGIS-Server-BUGFIX-GetLegendGraphics-set-layername.patch b/debian/patches/0001-QGIS-Server-BUGFIX-GetLegendGraphics-set-layername.patch
new file mode 100644
index 0000000..965dfcc
--- /dev/null
+++ b/debian/patches/0001-QGIS-Server-BUGFIX-GetLegendGraphics-set-layername.patch
@@ -0,0 +1,53 @@
+From 102cfedcba5a092f64e7bd076f6e86cceb21a774 Mon Sep 17 00:00:00 2001
+From: rldhont <rldhont at gmail.com>
+Date: Fri, 2 Jan 2015 14:49:35 +0100
+Subject: [QGIS-Server][BUGFIX] GetLegendGraphics set layername
+Origin: https://github.com/qgis/QGIS/commit/102cfedcba5a092f64e7bd076f6e86cceb21a774
+
+To have title instead of name in server getlegendgraphic response, the commit
+ bb95a0f43a53602bd7ad1ea6783d251755c66019 update getlegendgraphic to set the
+ tree layer name. This update set the layer name with layer title.
+
+To fix it, I just store the layers name and reset them at the end of
+ GetLegendGraphic request.
+---
+ src/mapserver/qgswmsserver.cpp |   16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+--- a/src/mapserver/qgswmsserver.cpp
++++ b/src/mapserver/qgswmsserver.cpp
+@@ -656,11 +656,20 @@ QImage* QgsWMSServer::getLegendGraphics(
+     }
+   }
+ 
++  // Create the layer tree root
+   QgsLayerTreeGroup rootGroup;
++  // Store layers' name to reset them
++  QMap<QString, QString> layerNameMap;
++  // Create tree layer node for each layer
+   foreach ( QString layerId, layerIds )
+   {
++    // get layer
+     QgsMapLayer *ml = QgsMapLayerRegistry::instance()->mapLayer( layerId );
++    // create tree layer node
+     QgsLayerTreeLayer *layer = rootGroup.addLayer( ml );
++    // store the layer's name
++    layerNameMap.insert( layerId, ml->name() );
++    // set layer name with layer's title to have it in legend
+     if ( !ml->title().isEmpty() )
+       layer->setLayerName( ml->title() );
+   }
+@@ -792,6 +801,13 @@ QImage* QgsWMSServer::getLegendGraphics(
+ 
+   p.end();
+ 
++  // reset layers' name
++  foreach ( QString layerId, layerIds )
++  {
++    QgsMapLayer *ml = QgsMapLayerRegistry::instance()->mapLayer( layerId );
++    ml->setLayerName( layerNameMap[ layerId ] );
++  }
++  //  clear map layer registry
+   QgsMapLayerRegistry::instance()->removeAllMapLayers();
+   return paintImage;
+ }
diff --git a/debian/patches/0001-fix-11872-do-not-call-activateLayerRelatedAction-aft.patch b/debian/patches/0001-fix-11872-do-not-call-activateLayerRelatedAction-aft.patch
new file mode 100644
index 0000000..7c069ac
--- /dev/null
+++ b/debian/patches/0001-fix-11872-do-not-call-activateLayerRelatedAction-aft.patch
@@ -0,0 +1,26 @@
+From ddb37e227c3a5336078647537b27c596e5f4d207 Mon Sep 17 00:00:00 2001
+From: Denis Rouzaud <denis.rouzaud at gmail.com>
+Date: Thu, 18 Dec 2014 08:07:19 +0100
+Subject: [fix #11872] do not call activateLayerRelatedAction after selection
+ change if layer is not current layer
+Origin: https://github.com/qgis/QGIS/commit/ddb37e227c3a5336078647537b27c596e5f4d207
+Bug: http://hub.qgis.org/issues/11872
+
+---
+ src/app/qgisapp.cpp |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/src/app/qgisapp.cpp
++++ b/src/app/qgisapp.cpp
+@@ -8914,7 +8914,10 @@ void QgisApp::selectionChanged( QgsMapLa
+   {
+     showStatusMessage( tr( "%n feature(s) selected on layer %1.", "number of selected features", vlayer->selectedFeatureCount() ).arg( vlayer->name() ) );
+   }
+-  activateDeactivateLayerRelatedActions( layer );
++  if ( layer == activeLayer() )
++  {
++    activateDeactivateLayerRelatedActions( layer );
++  }
+ }
+ 
+ void QgisApp::legendLayerSelectionChanged( void )
diff --git a/debian/patches/series b/debian/patches/series
index ededb62..dea66d4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,5 @@ allows-to-typo.patch
 python-env.patch
 disable-doxygen.patch
 0001-backported-fix-for-11694.patch
+0001-fix-11872-do-not-call-activateLayerRelatedAction-aft.patch
+0001-QGIS-Server-BUGFIX-GetLegendGraphics-set-layername.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/qgis.git



More information about the Pkg-grass-devel mailing list