nens / threedi-schematisation-editor

QGIS tool for editing schematisations
0 stars 0 forks source link

Explainer text in cross section 'table' input widget #64

Closed leendertvanwolfswinkel closed 1 year ago

leendertvanwolfswinkel commented 2 years ago

Like this:

image

Text:

Format this input as a CSV-style table of height, width pairs.

Example:

0.0, 0.5 0.5, 1.2 2.3, 3.2 4.4, 5.0

ldebek commented 2 years ago

@leendertvanwolfswinkel Fix ready for testing.

leendertvanwolfswinkel commented 1 year ago

Test results:

  1. I see explainer text in the table input widget for the Cross section location layer only. It is missing for Pipe, Weir, Orifice, Culvert
  2. Not sure which change caused this, but when I try to digitize a new Culvert, after finishing my drawing on the map canvas, I get this error:
Er trad een fout op bij het uitvoeren van de volgende code:
open_edit_form( _qgis_featureform_5_5, _qgis_layer_Culvert_451daba9_653f_40e6_a407_170ed295392a_5, _qgis_feature_20220922155648533)

Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users/leendert.vanwolfswin/AppData/Roaming/QGIS/QGIS3\profiles\Release candidates Sept 2022/python/plugins\threedi_schematisation_editor\utils.py", line 379, in open_edit_form
    plugin.layer_manager.populate_edit_form(dialog, layer, feature)
  File "C:\Users/leendert.vanwolfswin/AppData/Roaming/QGIS/QGIS3\profiles\Release candidates Sept 2022/python/plugins\threedi_schematisation_editor\user_layer_manager.py", line 392, in populate_edit_form
    self.form_factory.set_layer_form_logic(dialog, layer, feature)
  File "C:\Users/leendert.vanwolfswin/AppData/Roaming/QGIS/QGIS3\profiles\Release candidates Sept 2022/python/plugins\threedi_schematisation_editor\user_layer_forms.py", line 24, in set_layer_form_logic
    current_instance = layer_form(self.layer_manager, dialog, layer, feature)
  File "C:\Users/leendert.vanwolfswin/AppData/Roaming/QGIS/QGIS3\profiles\Release candidates Sept 2022/python/plugins\threedi_schematisation_editor\forms\custom_forms.py", line 705, in __init__
    super().__init__(*args, *kwargs)
  File "C:\Users/leendert.vanwolfswin/AppData/Roaming/QGIS/QGIS3\profiles\Release candidates Sept 2022/python/plugins\threedi_schematisation_editor\forms\custom_forms.py", line 401, in __init__
    super().__init__(*args, *kwargs)
  File "C:\Users/leendert.vanwolfswin/AppData/Roaming/QGIS/QGIS3\profiles\Release candidates Sept 2022/python/plugins\threedi_schematisation_editor\forms\custom_forms.py", line 58, in __init__
    self.set_foreign_widgets()
  File "C:\Users/leendert.vanwolfswin/AppData/Roaming/QGIS/QGIS3\profiles\Release candidates Sept 2022/python/plugins\threedi_schematisation_editor\forms\custom_forms.py", line 103, in set_foreign_widgets
    related_handler = self.layer_manager.model_handlers[related_cls]
KeyError: 
ldebek commented 1 year ago

Fix added.