@@ -884,47 +884,36 @@ void QgsRasterLayerProperties::apply()
884
884
// pixmapLegend->repaint();
885
885
886
886
QgsRasterResampleFilter* resampleFilter = mRasterLayer ->resampleFilter ();
887
-
888
- QgsRasterResampler* zoomedInResampler = 0 ;
889
- QString zoomedInResamplingMethod = mZoomedInResamplingComboBox ->currentText ();
890
- if ( zoomedInResamplingMethod == tr ( " Bilinear" ) )
891
- {
892
- zoomedInResampler = new QgsBilinearRasterResampler ();
893
- }
894
- else if ( zoomedInResamplingMethod == tr ( " Cubic" ) )
895
- {
896
- zoomedInResampler = new QgsCubicRasterResampler ();
897
- }
898
-
899
887
if ( resampleFilter )
900
888
{
889
+ QgsRasterResampler *zoomedInResampler = 0 ;
890
+ QString zoomedInResamplingMethod = mZoomedInResamplingComboBox ->currentText ();
891
+ if ( zoomedInResamplingMethod == tr ( " Bilinear" ) )
892
+ {
893
+ zoomedInResampler = new QgsBilinearRasterResampler ();
894
+ }
895
+ else if ( zoomedInResamplingMethod == tr ( " Cubic" ) )
896
+ {
897
+ zoomedInResampler = new QgsCubicRasterResampler ();
898
+ }
899
+
901
900
resampleFilter->setZoomedInResampler ( zoomedInResampler );
902
- }
903
901
904
- // raster resampling
905
- QgsRasterResampler* zoomedOutResampler = 0 ;
906
- QString zoomedOutResamplingMethod = mZoomedOutResamplingComboBox ->currentText ();
907
- if ( zoomedOutResamplingMethod == tr ( " Average" ) )
908
- {
909
- zoomedOutResampler = new QgsBilinearRasterResampler ();
910
- }
902
+ // raster resampling
903
+ QgsRasterResampler * zoomedOutResampler = 0 ;
904
+ QString zoomedOutResamplingMethod = mZoomedOutResamplingComboBox ->currentText ();
905
+ if ( zoomedOutResamplingMethod == tr ( " Average" ) )
906
+ {
907
+ zoomedOutResampler = new QgsBilinearRasterResampler ();
908
+ }
911
909
912
- if ( resampleFilter )
913
- {
914
910
resampleFilter->setZoomedOutResampler ( zoomedOutResampler );
915
- }
916
- else
917
- {
918
- delete zoomedOutResampler;
919
- }
920
911
921
- if ( resampleFilter )
922
- {
923
912
resampleFilter->setMaxOversampling ( mMaximumOversamplingSpinBox ->value () );
924
913
}
925
914
926
915
// Hue and saturation controls
927
- QgsHueSaturationFilter* hueSaturationFilter = mRasterLayer ->hueSaturationFilter ();
916
+ QgsHueSaturationFilter * hueSaturationFilter = mRasterLayer ->hueSaturationFilter ();
928
917
if ( hueSaturationFilter )
929
918
{
930
919
hueSaturationFilter->setSaturation ( sliderSaturation->value () );
0 commit comments