Skip to content
Permalink
Browse files

[db manager] Fix virtual layers plugin (fixes #14404)

  • Loading branch information
Hugo Mercier
Hugo Mercier committed Mar 23, 2016
1 parent 3d16010 commit 7dbc0bf81992cd58a6e4d0b081941f3c20f168ca
Showing with 8 additions and 2 deletions.
  1. +8 −2 python/plugins/db_manager/db_plugins/vlayers/data_model.py
@@ -26,7 +26,7 @@
from ..plugin import DbError

from PyQt.QtCore import QUrl, QTime, QTemporaryFile
from qgis.core import QGis, QgsVectorLayer
from qgis.core import QGis, QgsVectorLayer, QgsWKBTypes


class LTableDataModel(TableDataModel):
@@ -46,7 +46,13 @@ def __init__(self, table, parent=None):
# populate self.resdata
self.resdata = []
for f in self.layer.getFeatures():
self.resdata.append(f.attributes())
a = f.attributes()
# add the geometry type
if f.geometry():
a.append(QgsWKBTypes.displayString(QGis.fromOldWkbType(f.geometry().wkbType())))
else:
a.append('None')
self.resdata.append(a)

self.fetchedFrom = 0
self.fetchedCount = len(self.resdata)

0 comments on commit 7dbc0bf

Please sign in to comment.
You can’t perform that action at this time.