Skip to content

Commit

Permalink
use Shift modifier for bigger step when changing brightness/contrast
Browse files Browse the repository at this point in the history
(fix #8177)
  • Loading branch information
alexbruy committed Mar 24, 2014
1 parent 2fab405 commit 4ecdc6b
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions src/app/qgisapp.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit 4ecdc6b

Please sign in to comment.