diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 3af71e52f9b4..34f58db582bc 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -5709,6 +5709,9 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer ) mActionRotateLabel->setEnabled( false ); mActionChangeLabelProperties->setEnabled( false ); + mActionLocalHistogramStretch->setEnabled( false ); + mActionFullHistogramStretch->setEnabled( false ); + return; } @@ -5722,6 +5725,9 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer ) QgsVectorDataProvider* dprovider = vlayer->dataProvider(); bool layerHasSelection = vlayer->selectedFeatureCount() != 0; + mActionLocalHistogramStretch->setEnabled( false ); + mActionFullHistogramStretch->setEnabled( false ); + mActionSelect->setEnabled( true ); mActionSelectRectangle->setEnabled( true ); mActionSelectPolygon->setEnabled( true ); @@ -5945,10 +5951,12 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer ) } mActionLayerSubsetString->setEnabled( false ); - } + }//end vector layer block /*************Raster layers*************/ else if ( layer->type() == QgsMapLayer::RasterLayer ) { + mActionLocalHistogramStretch->setEnabled( true ); + mActionFullHistogramStretch->setEnabled( true ); mActionLayerSubsetString->setEnabled( false ); mActionSelect->setEnabled( false ); mActionSelectRectangle->setEnabled( false );