Skip to content
Permalink
Browse files
Fix but where layer does not refresh when applying local histogram st…
…retch and render caching is enabled. Also update legend pixmap if performing a local stretch

git-svn-id: http://svn.osgeo.org/qgis/trunk@15190 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Feb 18, 2011
1 parent 569f342 commit 65a3d70059aef5b99097abc24daec02dbc5c605a
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/app/legend/qgslegend.cpp
@@ -1712,6 +1712,8 @@ void QgsLegend::legendLayerStretchUsingCurrentExtent()
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 @@ void QgsLegend::legendLayerStretchUsingCurrentExtent()
}

layer->setMinimumMaximumUsingLastExtent();
layer->setCacheImage(NULL);
refreshLayerSymbology( layer->getLayerID() );
mMapCanvas->refresh();
}
}

0 comments on commit 65a3d70

Please sign in to comment.