Skip to content
Permalink
Browse files
minor change to avoid showing non-file-based layers
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@51 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf committed Mar 21, 2012
1 parent 3e95fb5 commit a7b72bee30e64db9d246b2e6bf89e1c3fd5569fc
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/sextante/core/QGisLayers.py
@@ -4,6 +4,7 @@
from PyQt4 import QtCore, QtGui
from os import path
from sextante.core.SextanteConfig import SextanteConfig
import os.path

class QGisLayers:

@@ -17,7 +18,8 @@ def getRasterLayers():

for layer in layers:
if layer.type() == layer.RasterLayer:
raster.append(layer)
if os.path.exists(layer.source()):
raster.append(layer)
return raster

@staticmethod
@@ -27,7 +29,8 @@ def getVectorLayers(shapetype=-1):
for layer in layers:
if layer.type() == layer.VectorLayer:
if shapetype == QGisLayers.ALL_TYPES or layer.geometryType() == shapetype:
vector.append(layer)
if os.path.exists(layer.source()):
vector.append(layer)
return vector

@staticmethod

0 comments on commit a7b72be

Please sign in to comment.