Skip to content

Commit

Permalink
Fix but where layer does not refresh when applying local histogram st…
Browse files Browse the repository at this point in the history
…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 65a3d70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -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 );
Expand All @@ -1727,6 +1729,8 @@ void QgsLegend::legendLayerStretchUsingCurrentExtent()
}

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

0 comments on commit 65a3d70

Please sign in to comment.