[QGIS Commit] r15121 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Feb 2 16:11:37 EST 2011


Author: mhugent
Date: 2011-02-02 13:11:36 -0800 (Wed, 02 Feb 2011)
New Revision: 15121

Modified:
   trunk/qgis/src/app/qgisapp.cpp
Log:
Remaining fix for bug #3459

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2011-02-02 14:19:56 UTC (rev 15120)
+++ trunk/qgis/src/app/qgisapp.cpp	2011-02-02 21:11:36 UTC (rev 15121)
@@ -4933,6 +4933,7 @@
 
   // launch the query builder
   QgsQueryBuilder *qb = new QgsQueryBuilder( vlayer, this );
+  QString subsetBefore = vlayer->subsetString();
 
   // Set the sql in the query builder to the same in the prop dialog
   // (in case the user has already changed it)
@@ -4940,9 +4941,14 @@
   // Open the query builder
   if ( qb->exec() )
   {
-    // if the sql is changed, update it in the prop subset text box
-    vlayer->setSubsetString( qb->sql() );
-    mMapCanvas->refresh();
+    if ( subsetBefore != qb->sql() )
+    {
+      mMapCanvas->refresh();
+      if ( mMapLegend )
+      {
+        mMapLegend->refreshLayerSymbology( vlayer->getLayerID(), false );
+      }
+    }
   }
 
   // delete the query builder object



More information about the QGIS-commit mailing list