Skip to content

Commit

Permalink
add saturation sync when loading qml file
Browse files Browse the repository at this point in the history
  • Loading branch information
speillet authored and nyalldawson committed Oct 5, 2020
1 parent 26160a1 commit d950761
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/gui/raster/qgsrasterlayerproperties.cpp
Expand Up @@ -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
*/
Expand Down

0 comments on commit d950761

Please sign in to comment.