db manager: fix layer custom action

This commit is contained in:
Juergen E. Fischer 2017-05-18 10:01:05 +02:00
parent 68b990b3bb
commit d1cc574a4f

View File

@ -82,7 +82,7 @@ class DBManagerPlugin(object):
uri = QgsDataSourceUri(aMapLayer.source())
table = uri.table()
if table.startswith('(') and table.endswith(')'):
self.addCustomActionForLayer(self.layerAction, aMapLayer)
self.iface.addCustomActionForLayer(self.layerAction, aMapLayer)
# virtual has QUrl source
# url = QUrl(QUrl.fromPercentEncoding(l.source()))
# url.queryItemValue('query')