Skip to content

Commit 635e19a

Browse files
committed
fix for #6749 and #6278
1 parent b54c3bf commit 635e19a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/plugins/sextante/gui/NumberInputDialog.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@ def fillTree(self):
8686
layers = QGisLayers.getRasterLayers()
8787
for layer in layers:
8888
for i in range(layer.bandCount()):
89-
stats = layer.bandStatistics(i)
89+
if QGis.QGIS_VERSION_INT >= 10900:
90+
stats = layer.dataProvider().bandStatistics(i+1)
91+
else:
92+
stats = layer.bandStatistics(i)
9093
layerItem = QtGui.QTreeWidgetItem()
9194
layerItem.setText(0, unicode(layer.name()))
9295
layerItem.addChild(TreeValueItem("Mean", stats.mean))

0 commit comments

Comments
 (0)