make tools working with the raster provider

git-svn-id: http://svn.osgeo.org/qgis/trunk@15459 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
brushtyler 2011-03-13 01:16:00 +00:00
parent 8c4ab1cae5
commit 2251df175b
3 changed files with 5 additions and 3 deletions

View File

@ -89,7 +89,7 @@ class GdalTools:
rasterText = QCoreApplication.translate( "QgisApp", "&Raster" )
for a in actions:
if a.menu().title() == rasterText:
if a.menu() != None and a.menu().title() == rasterText:
rasterMenu = a.menu()
break

View File

@ -22,7 +22,7 @@ def name():
def description():
return "Integrate gdal tools into qgis"
def version():
return "Version 1.2.20"
return "Version 1.2.21"
def qgisMinimumVersion():
return "1.0"
def icon():

View File

@ -98,7 +98,9 @@ def getRasterLayers():
layerMap = QgsMapLayerRegistry.instance().mapLayers()
for name, layer in layerMap.iteritems():
# only raster layers, but not WMS ones
if layer.type() == layer.RasterLayer and ( not layer.usesProvider() ):
if layer.type() == layer.RasterLayer:
if layer.usesProvider() and layer.providerKey() != 'gdal':
continue
layers[count] = layer
names.append(layer.name())
count = count +1