@@ -695,12 +695,18 @@ void QgsRasterLayerProperties::sync()
695
695
cboxContrastEnhancementAlgorithm->setCurrentIndex ( cboxContrastEnhancementAlgorithm->findText ( tr ( " No Stretch" ) ) );
696
696
}
697
697
698
- // Display the current default contrast enhancement algorithm
698
+ // Display the current default band combination
699
699
mDefaultRedBand = myQSettings.value ( " /Raster/defaultRedBand" , 1 ).toInt ();
700
700
mDefaultGreenBand = myQSettings.value ( " /Raster/defaultGreenBand" , 2 ).toInt ();
701
701
mDefaultBlueBand = myQSettings.value ( " /Raster/defaultBlueBand" , 3 ).toInt ();
702
702
labelDefaultBandCombination->setText ( tr ( " Default R:%1 G:%2 B:%3" ).arg ( mDefaultRedBand ) .arg ( mDefaultGreenBand ) .arg ( mDefaultBlueBand ) );
703
703
704
+ // and used band combination
705
+ cboRed->setCurrentIndex ( cboRed->findText ( mRasterLayer ->redBandName () ) );
706
+ cboGreen->setCurrentIndex ( cboGreen->findText ( mRasterLayer ->greenBandName () ) );
707
+ cboBlue->setCurrentIndex ( cboBlue->findText ( mRasterLayer ->blueBandName () ) );
708
+
709
+ // Display the current default contrast enhancement algorithm
704
710
mDefaultContrastEnhancementAlgorithm = myQSettings.value ( " /Raster/defaultContrastEnhancementAlgorithm" , " NoEnhancement" ).toString ();
705
711
if ( mDefaultContrastEnhancementAlgorithm == " NoEnhancement" )
706
712
{
@@ -722,6 +728,8 @@ void QgsRasterLayerProperties::sync()
722
728
{
723
729
labelDefaultContrastEnhancementAlgorithm->setText ( tr ( " No Stretch" ) );
724
730
}
731
+ mDefaultStandardDeviation = myQSettings.value (" /Raster/defaultStandardDeviation" , 1.0 ).toDouble ();
732
+ sboxThreeBandStdDev->setValue (mDefaultStandardDeviation );
725
733
}
726
734
727
735
QgsDebugMsg ( " populate transparency tab" );
@@ -2193,6 +2201,7 @@ void QgsRasterLayerProperties::on_rbtnThreeBandMinMax_toggled( bool theState )
2193
2201
void QgsRasterLayerProperties::on_rbtnThreeBandStdDev_toggled ( bool theState )
2194
2202
{
2195
2203
sboxThreeBandStdDev->setEnabled ( theState );
2204
+ sboxThreeBandStdDev->setValue ( mDefaultStandardDeviation );
2196
2205
}
2197
2206
2198
2207
void QgsRasterLayerProperties::pixelSelected ( int x, int y )
0 commit comments