linz / gazetteer

New Zealand Gazetteer of official place names
http://www.linz.govt.nz/regulatory/place-names/find-name/new-zealand-gazetteer-official-geographic-names/new-zealand-gazetteer-search-place-names#zoom=0&lat=-41.14127&lon=172.5&layers=BTTT
Other
2 stars 2 forks source link

New feature geometries tool does not appear correct #156

Closed SPlanzer closed 3 years ago

SPlanzer commented 3 years ago

My Confusion

After porting to QGIS3 the "New feature geometries tool" results in a dialog being shown once a new geom is drawn.

This is shown as below:

image

This is as expected as the original source code has not been modified since 2015 and shows that the form shown is what was originally written.

Note; this shows a QLineEdit as the dialogs main feature.

The test plan for porting I am working to, shows this should have a QLabel instead of the QLineEdit. This make more sense as at this stage in the workflow it seems the app should be just communicating with the user as opposed to fetching data.

below is what the test plan indicates is expected after drawing a new geom image

For Now

I will continue with the test plan for now as what is most important is what the buttons connect to and the functionality they invoke.

Required

I will meet with @CMKMS-LINZ to understand what is expected here and if I am missing something

SPlanzer commented 3 years ago

This form that is opening is a default QGIS layer form.

Therefore the correct form is not being invoked and instead this default form

SPlanzer commented 3 years ago

The layer's editFormConfig points to the correct UI element (see below).

So why is it not using the correct form?

layer = QgsProject.instance().mapLayersByName('Gazetteer feature point')[0]
layer.editFormConfig().uiForm()

>>> '/home/splanzer/.local/share/QGIS/QGIS3/profiles/default/python/plugins/NZGBplugin/forms/featgeom.ui'
SPlanzer commented 3 years ago

Resolved by #162