Skip to content
Browse files
db manager: don't consider added layer w/o a dataProvider
(cherry picked from commit 28aa9ebdb75eb099b83a3596b3f3c5c6e5c6f591)
  • Loading branch information
jef-n committed Aug 30, 2016
1 parent 46ea229 commit a9464d7
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 a9464d7

Please sign in to comment.