elpaso / qgis-formawarevaluerelationwidget

A Form-Aware Value Relation Widget plugin for QGIS
6 stars 8 forks source link

Widget is not populated on table without geometry #22

Closed jdlom closed 6 years ago

jdlom commented 6 years ago

This seems to be a regression.

On version 1.5, the widget on table without geometry is populated as expected. On version 1.7, the widget is not populated : Error on python console :

Console Python
Utilisez iface pour accéder à l'interface de l'API QGIS ou tapez help(iface) pour plus d'informations
Traceback (most recent call last):
  File "C:/Users/x.y/.qgis2/python/plugins\FormAwareValueRelationWidget\FormAwareValueRelationWidget.py", line 324, in attributeChanged
    self.populateWidget()
  File "C:/Users/x.y/.qgis2/python/plugins\FormAwareValueRelationWidget\FormAwareValueRelationWidget.py", line 353, in populateWidget
    form_vars['wkt_geom'] = self.mFeature.geometry().exportToWkt(8)
AttributeError: 'NoneType' object has no attribute 'exportToWkt'
Traceback (most recent call last):
  File "C:/Users/x.y/.qgis2/python/plugins\FormAwareValueRelationWidget\FormAwareValueRelationWidget.py", line 324, in attributeChanged
    self.populateWidget()
  File "C:/Users/x.y/.qgis2/python/plugins\FormAwareValueRelationWidget\FormAwareValueRelationWidget.py", line 353, in populateWidget
    form_vars['wkt_geom'] = self.mFeature.geometry().exportToWkt(8)
AttributeError: 'NoneType' object has no attribute 'exportToWkt'
mclucky commented 6 years ago

Hi @lejedi76

we observed similar behavior and described it in #20 What do you exactly mean with "the widget is not populated"?

jdlom commented 6 years ago

Yes, this is clearly related to #20. What I mean with "the widget is not populated" is that the combobox is not filled.

I think the PR 20b05c28b6155e4161ed06646ff8281edb5a1821 that you proposed may fix this issue.

Best regards,

mclucky commented 6 years ago

Hi @lejedi76 I think you can close this issue as our PR is now merged into master.