[QGIS Commit] r15433 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Mar 11 10:54:45 EST 2011
Author: timlinux
Date: 2011-03-11 07:54:45 -0800 (Fri, 11 Mar 2011)
New Revision: 15433
Modified:
trunk/qgis/src/app/qgisapp.cpp
Log:
Enable/disable raster icons based on context of which layer is active
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2011-03-11 14:44:05 UTC (rev 15432)
+++ trunk/qgis/src/app/qgisapp.cpp 2011-03-11 15:54:45 UTC (rev 15433)
@@ -5709,6 +5709,9 @@
mActionRotateLabel->setEnabled( false );
mActionChangeLabelProperties->setEnabled( false );
+ mActionLocalHistogramStretch->setEnabled( false );
+ mActionFullHistogramStretch->setEnabled( false );
+
return;
}
@@ -5722,6 +5725,9 @@
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 @@
}
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 );
More information about the QGIS-commit
mailing list