Skip to content
Permalink
Browse files

use Shift modifier for bigger step when changing brightness/contrast

(fix #8177)
  • Loading branch information
alexbruy committed Mar 24, 2014
1 parent 2fab405 commit 4ecdc6b3202d4ee7d739a1e51cedfb11be63091b
Showing with 24 additions and 5 deletions.
  1. +24 −5 src/app/qgisapp.cpp
@@ -7010,25 +7010,44 @@ void QgisApp::histogramStretch( bool visibleAreaOnly, QgsRaster::ContrastEnhance

void QgisApp::increaseBrightness()
{
adjustBrightnessContrast( 1 );
int step = 1;
if ( QgsApplication::keyboardModifiers() == Qt::ShiftModifier )
{
step = 10;
}
adjustBrightnessContrast( step );
}

void QgisApp::decreaseBrightness()
{
adjustBrightnessContrast( -1 );
int step = -1;
if ( QgsApplication::keyboardModifiers() == Qt::ShiftModifier )
{
step = -10;
}
adjustBrightnessContrast( step );
}

void QgisApp::increaseContrast()
{
adjustBrightnessContrast( 1, false );
int step = 1;
if ( QgsApplication::keyboardModifiers() == Qt::ShiftModifier )
{
step = 10;
}
adjustBrightnessContrast( step, false );
}

void QgisApp::decreaseContrast()
{
adjustBrightnessContrast( -1, false );
int step = -1;
if ( QgsApplication::keyboardModifiers() == Qt::ShiftModifier )
{
step = -10;
}
adjustBrightnessContrast( step, false );
}


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

0 comments on commit 4ecdc6b

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