Skip to content
Permalink
Browse files
Apply suggestions from code review
  • Loading branch information
nyalldawson authored and github-actions committed Oct 29, 2021
1 parent 5969ae2 commit d72524826b8463ac822e48c896e8dc4881b9b4ba
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/gui/raster/qgsrendererrasterpropertieswidget.cpp
@@ -296,7 +296,7 @@ void QgsRendererRasterPropertiesWidget::setRendererWidget( const QString &render
const QgsRectangle myExtent = mMapCanvas->mapSettings().outputExtentToLayerExtent( mRasterLayer, mMapCanvas->extent() );
if ( oldWidget )
{
QgsRasterRenderer *oldRenderer = oldWidget->renderer();
std::unique_ptr< QgsRasterRenderer > oldRenderer( oldWidget->renderer() );
if ( !oldRenderer || oldRenderer->type() != rendererName )
{
if ( rendererName == QLatin1String( "singlebandgray" ) )
@@ -310,7 +310,6 @@ void QgsRendererRasterPropertiesWidget::setRendererWidget( const QString &render
whileBlocking( mRasterLayer )->setDefaultContrastEnhancement();
}
}
delete oldRenderer;
}
mRasterLayer->renderer()->setAlphaBand( alphaBand );
mRasterLayer->renderer()->setOpacity( opacity );

0 comments on commit d725248

Please sign in to comment.