Skip to content

Commit 0ebf28a

Browse files
committedJun 29, 2013
enable/disable raster tools (fixes #8179)
1 parent 4374893 commit 0ebf28a

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2657,10 +2657,17 @@ void QgisApp::askUserForGDALSublayers( QgsRasterLayer *layer )
26572657
name.replace( path, "" );
26582658
}
26592659
// remove any : or " left over
2660-
if ( name.startsWith( ":" ) ) name.remove( 0, 1 );
2661-
if ( name.startsWith( "\"" ) ) name.remove( 0, 1 );
2662-
if ( name.endsWith( ":" ) ) name.chop( 1 );
2663-
if ( name.endsWith( "\"" ) ) name.chop( 1 );
2660+
if ( name.startsWith( ":" ) )
2661+
name.remove( 0, 1 );
2662+
2663+
if ( name.startsWith( "\"" ) )
2664+
name.remove( 0, 1 );
2665+
2666+
if ( name.endsWith( ":" ) )
2667+
name.chop( 1 );
2668+
2669+
if ( name.endsWith( "\"" ) )
2670+
name.chop( 1 );
26642671

26652672
names << name;
26662673
layers << QString( "%1|%2" ).arg( i ).arg( name );
@@ -6555,7 +6562,8 @@ void QgisApp::histogramStretch( bool visibleAreaOnly, QgsRaster::ContrastEnhance
65556562
}
65566563

65576564
QgsRectangle myRectangle;
6558-
if ( visibleAreaOnly ) myRectangle = mMapCanvas->mapRenderer()->outputExtentToLayerExtent( myRasterLayer, mMapCanvas->extent() );
6565+
if ( visibleAreaOnly )
6566+
myRectangle = mMapCanvas->mapRenderer()->outputExtentToLayerExtent( myRasterLayer, mMapCanvas->extent() );
65596567

65606568
myRasterLayer->setContrastEnhancement( QgsContrastEnhancement::StretchToMinimumMaximum, theLimits, myRectangle );
65616569

@@ -7954,6 +7962,12 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
79547962

79557963
mActionLocalHistogramStretch->setEnabled( false );
79567964
mActionFullHistogramStretch->setEnabled( false );
7965+
mActionLocalCumulativeCutStretch->setEnabled( false );
7966+
mActionFullCumulativeCutStretch->setEnabled( false );
7967+
mActionIncreaseBrightness->setEnabled( false );
7968+
mActionDecreaseBrightness->setEnabled( false );
7969+
mActionIncreaseContrast->setEnabled( false );
7970+
mActionDecreaseContrast->setEnabled( false );
79577971
mActionZoomActualSize->setEnabled( false );
79587972
mActionZoomToLayer->setEnabled( false );
79597973
return;
@@ -7985,6 +7999,12 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
79857999

79868000
mActionLocalHistogramStretch->setEnabled( false );
79878001
mActionFullHistogramStretch->setEnabled( false );
8002+
mActionLocalCumulativeCutStretch->setEnabled( false );
8003+
mActionFullCumulativeCutStretch->setEnabled( false );
8004+
mActionIncreaseBrightness->setEnabled( false );
8005+
mActionDecreaseBrightness->setEnabled( false );
8006+
mActionIncreaseContrast->setEnabled( false );
8007+
mActionDecreaseContrast->setEnabled( false );
79888008
mActionZoomActualSize->setEnabled( false );
79898009
mActionLabeling->setEnabled( true );
79908010

@@ -8132,6 +8152,14 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
81328152
mActionLocalHistogramStretch->setEnabled( false );
81338153
mActionFullHistogramStretch->setEnabled( false );
81348154
}
8155+
8156+
mActionLocalCumulativeCutStretch->setEnabled( true );
8157+
mActionFullCumulativeCutStretch->setEnabled( true );
8158+
mActionIncreaseBrightness->setEnabled( true );
8159+
mActionDecreaseBrightness->setEnabled( true );
8160+
mActionIncreaseContrast->setEnabled( true );
8161+
mActionDecreaseContrast->setEnabled( true );
8162+
81358163
mActionLayerSubsetString->setEnabled( false );
81368164
mActionFeatureAction->setEnabled( false );
81378165
mActionSelect->setEnabled( false );

0 commit comments

Comments
 (0)
Please sign in to comment.