Skip to content

Commit

Permalink
make tools working with the raster provider
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15459 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Mar 13, 2011
1 parent 8c4ab1c commit 2251df1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/plugins/GdalTools/GdalTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def initGui( self ):
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

Expand Down
2 changes: 1 addition & 1 deletion python/plugins/GdalTools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
4 changes: 3 additions & 1 deletion python/plugins/GdalTools/tools/GdalTools_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2251df1

Please sign in to comment.