Skip to content

Commit 4ecdc6b

Browse files
committed
use Shift modifier for bigger step when changing brightness/contrast
(fix #8177)
1 parent 2fab405 commit 4ecdc6b

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

src/app/qgisapp.cpp

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7010,25 +7010,44 @@ void QgisApp::histogramStretch( bool visibleAreaOnly, QgsRaster::ContrastEnhance
70107010

70117011
void QgisApp::increaseBrightness()
70127012
{
7013-
adjustBrightnessContrast( 1 );
7013+
int step = 1;
7014+
if ( QgsApplication::keyboardModifiers() == Qt::ShiftModifier )
7015+
{
7016+
step = 10;
7017+
}
7018+
adjustBrightnessContrast( step );
70147019
}
70157020

70167021
void QgisApp::decreaseBrightness()
70177022
{
7018-
adjustBrightnessContrast( -1 );
7023+
int step = -1;
7024+
if ( QgsApplication::keyboardModifiers() == Qt::ShiftModifier )
7025+
{
7026+
step = -10;
7027+
}
7028+
adjustBrightnessContrast( step );
70197029
}
70207030

70217031
void QgisApp::increaseContrast()
70227032
{
7023-
adjustBrightnessContrast( 1, false );
7033+
int step = 1;
7034+
if ( QgsApplication::keyboardModifiers() == Qt::ShiftModifier )
7035+
{
7036+
step = 10;
7037+
}
7038+
adjustBrightnessContrast( step, false );
70247039
}
70257040

70267041
void QgisApp::decreaseContrast()
70277042
{
7028-
adjustBrightnessContrast( -1, false );
7043+
int step = -1;
7044+
if ( QgsApplication::keyboardModifiers() == Qt::ShiftModifier )
7045+
{
7046+
step = -10;
7047+
}
7048+
adjustBrightnessContrast( step, false );
70297049
}
70307050

7031-
70327051
void QgisApp::adjustBrightnessContrast( int delta, bool updateBrightness )
70337052
{
70347053
QgsMapLayer * myLayer = mMapLegend->currentLayer();

0 commit comments

Comments
 (0)