Skip to content
Permalink
Browse files
run astyle_all.sh
Signed-off-by: Benjamin Jakimow <benjamin.jakimow@geo.hu-berlin.de>
  • Loading branch information
jakimowb authored and nyalldawson committed Oct 29, 2021
1 parent 84808e4 commit b2390af50c0178d70622d4d0dc81c5f9cb57f269
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/gui/raster/qgsrendererrasterpropertieswidget.cpp
@@ -297,18 +297,18 @@ void QgsRendererRasterPropertiesWidget::setRendererWidget( const QString &render
if ( oldWidget )
{
QgsRasterRenderer *oldRenderer = oldWidget->renderer();
if (!oldRenderer || oldRenderer->type() != rendererName)
if ( !oldRenderer || oldRenderer->type() != rendererName )
{
if ( rendererName == QLatin1String( "singlebandgray" ) )
{
whileBlocking( mRasterLayer )->setRenderer( QgsApplication::rasterRendererRegistry()->defaultRendererForDrawingStyle( QgsRaster::SingleBandGray, mRasterLayer->dataProvider() ) );
whileBlocking( mRasterLayer )->setDefaultContrastEnhancement();
}
else if ( rendererName == QLatin1String( "multibandcolor" ) )
{
whileBlocking( mRasterLayer )->setRenderer( QgsApplication::rasterRendererRegistry()->defaultRendererForDrawingStyle( QgsRaster::MultiBandColor, mRasterLayer->dataProvider() ) );
whileBlocking( mRasterLayer )->setDefaultContrastEnhancement();
}
if ( rendererName == QLatin1String( "singlebandgray" ) )
{
whileBlocking( mRasterLayer )->setRenderer( QgsApplication::rasterRendererRegistry()->defaultRendererForDrawingStyle( QgsRaster::SingleBandGray, mRasterLayer->dataProvider() ) );
whileBlocking( mRasterLayer )->setDefaultContrastEnhancement();
}
else if ( rendererName == QLatin1String( "multibandcolor" ) )
{
whileBlocking( mRasterLayer )->setRenderer( QgsApplication::rasterRendererRegistry()->defaultRendererForDrawingStyle( QgsRaster::MultiBandColor, mRasterLayer->dataProvider() ) );
whileBlocking( mRasterLayer )->setDefaultContrastEnhancement();
}
}
delete oldRenderer;
}

0 comments on commit b2390af

Please sign in to comment.