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 2f94c66b57bf462315ad62169cf6259eca2e8c4a
Showing with 1 addition and 1 deletion.
  1. +1 −1 python/plugins/db_manager/
@@ -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.