BIM: Fix widget value setting in ArchMaterial (#24710)

ArchMaterial's view provider has a setTaskValue helper to set values of widgets inside a task panel. While specific to ArchMaterial, the real place where the helper is called is at BIM_Classification. It appears it's not a general but more like an ad-hoc API for a specific purpose and for a specific object.

In any case, this fix allows widgets that expect a numerical value to have their value set. Before, their value was set as text, unexpectedly.
This commit is contained in:
Furgo
2025-10-19 11:13:51 +02:00
committed by GitHub
parent ac21faf35e
commit 2796296a24

View File

@@ -471,7 +471,7 @@ class _ViewProviderArchMaterial:
if hasattr(widget, "setText"):
widget.setText(value)
elif hasattr(widget, "setValue"):
widget.setText(value)
widget.setValue(value)
def dumps(self):
return None