Skip to content
Permalink
Browse files

add saturation sync when loading qml file

  • Loading branch information
speillet authored and nyalldawson committed Oct 5, 2020
1 parent 26160a1 commit d950761238b7849b778141bcd6a2cc61f8ab165a
Showing with 18 additions and 0 deletions.
  1. +18 −0 src/gui/raster/qgsrasterlayerproperties.cpp
@@ -770,6 +770,24 @@ void QgsRasterLayerProperties::sync()
mGammaSpinBox->setValue( brightnessFilter->gamma() );
}

// Hue and saturation color control
const QgsHueSaturationFilter *hueSaturationFilter = mRasterLayer->hueSaturationFilter();
//set hue and saturation controls to current values
if ( hueSaturationFilter )
{
sliderSaturation->setValue( hueSaturationFilter->saturation() );
comboGrayscale->setCurrentIndex( ( int ) hueSaturationFilter->grayscaleMode() );

// Set state of saturation controls based on grayscale mode choice
toggleSaturationControls( static_cast<int>( hueSaturationFilter->grayscaleMode() ) );

// Set state of colorize controls
mColorizeCheck->setChecked( hueSaturationFilter->colorizeOn() );
btnColorizeColor->setColor( hueSaturationFilter->colorizeColor() );
toggleColorizeControls( hueSaturationFilter->colorizeOn() );
sliderColorizeStrength->setValue( hueSaturationFilter->colorizeStrength() );
}

/*
* Transparent Pixel Tab
*/

0 comments on commit d950761

Please sign in to comment.
You can’t perform that action at this time.