[SCM] qgis branch, master, updated. a2ee769957385f4e084c5e8b6ba178a8c877d1db

Marco Hugentobler marco.hugentobler at sourcepole.ch
Tue Mar 20 13:43:45 UTC 2012


The following commit has been merged in the master branch:
commit c9bbcd8a7bb0b28301126d4ec126d0cce5fbd572
Author: Marco Hugentobler <marco.hugentobler at sourcepole.ch>
Date:   Sun Mar 18 09:37:17 2012 +0100

    Restrict input type for zonal statistics to gdal rasters for now (switch to use QgsRasterDataProvider in the mid term)

diff --git a/src/plugins/zonal_statistics/qgszonalstatisticsdialog.cpp b/src/plugins/zonal_statistics/qgszonalstatisticsdialog.cpp
index db63971..779cd7b 100644
--- a/src/plugins/zonal_statistics/qgszonalstatisticsdialog.cpp
+++ b/src/plugins/zonal_statistics/qgszonalstatisticsdialog.cpp
@@ -61,7 +61,11 @@ void QgsZonalStatisticsDialog::insertAvailableLayers()
     QgsRasterLayer* rl = dynamic_cast<QgsRasterLayer*>( layer_it.value() );
     if ( rl )
     {
-      mRasterLayerComboBox->addItem( rl->name(), QVariant( rl->source() ) );
+      QgsRasterDataProvider* rp = rl->dataProvider();
+      if ( rp && rp->name() == "gdal" )
+      {
+        mRasterLayerComboBox->addItem( rl->name(), QVariant( rl->source() ) );
+      }
     }
     else
     {

-- 
The Quantum GIS in Debian project



More information about the Pkg-grass-devel mailing list