[QGIS Commit] r15190 - trunk/qgis/src/app/legend

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Feb 18 04:44:26 EST 2011


Author: timlinux
Date: 2011-02-18 01:44:26 -0800 (Fri, 18 Feb 2011)
New Revision: 15190

Modified:
   trunk/qgis/src/app/legend/qgslegend.cpp
Log:
Fix but where layer does not refresh when applying local histogram stretch and render caching is enabled. Also update legend pixmap if performing a local stretch

Modified: trunk/qgis/src/app/legend/qgslegend.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.cpp	2011-02-18 09:13:20 UTC (rev 15189)
+++ trunk/qgis/src/app/legend/qgslegend.cpp	2011-02-18 09:44:26 UTC (rev 15190)
@@ -1712,6 +1712,8 @@
   QgsRasterLayer *layer =  qobject_cast<QgsRasterLayer *>( currentLayer->layer() );
   if ( layer )
   {
+    // Note: Do we really want to do these next clauses? The user will get a surprise when the
+    // drawing style they are using suddenly changes....! TS
     if ( layer->drawingStyle() == QgsRasterLayer::SingleBandPseudoColor )
     {
       layer->setDrawingStyle( QgsRasterLayer::SingleBandGray );
@@ -1727,6 +1729,8 @@
     }
 
     layer->setMinimumMaximumUsingLastExtent();
+    layer->setCacheImage(NULL);
+    refreshLayerSymbology( layer->getLayerID() );
     mMapCanvas->refresh();
   }
 }



More information about the QGIS-commit mailing list