Skip to content
Permalink
Browse files
Apply suggestions from code review
  • Loading branch information
nyalldawson committed Oct 29, 2021
1 parent b2390af commit 95f782934629ab3ab0152baebb32b582e836355e
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 95f7829

Please sign in to comment.