Skip to content
Permalink
Browse files

Restrict input type for zonal statistics to gdal rasters for now (swi…

…tch to use QgsRasterDataProvider in the mid term)
  • Loading branch information
mhugent committed Mar 18, 2012
1 parent 9f57650 commit c9bbcd8a7bb0b28301126d4ec126d0cce5fbd572
Showing with 5 additions and 1 deletion.
  1. +5 −1 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
{

0 comments on commit c9bbcd8

Please sign in to comment.