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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user