Skip to content
Browse files
db manager: don't consider added layer w/o a dataProvider
  • Loading branch information
jef-n committed Aug 30, 2016
1 parent 5cc97ab commit 2f94c66
Showing 1 changed file with 1 addition and 1 deletion.
@@ -78,7 +78,7 @@ def unload(self):

def onLayerWasAdded(self, aMapLayer):
if aMapLayer.dataProvider().name() in ['postgres', 'spatialite', 'oracle']:
if hasattr(aMapLayer, 'dataProvider') and aMapLayer.dataProvider().name() in ['postgres', 'spatialite', 'oracle']:
uri = QgsDataSourceURI(aMapLayer.source())
if'^\(SELECT .+ FROM .+\)$', uri.table(), re.S):
self.iface.legendInterface().addLegendLayerActionForLayer(self.layerAction, aMapLayer)

0 comments on commit 2f94c66

Please sign in to comment.