mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
Small fix on previous commit
This commit is contained in:
committed by
Bruno Perdigão
parent
edf0804b0e
commit
d63961d840
@@ -50,10 +50,6 @@ class PolylineUI:
|
||||
|
||||
def get_text_value(self, attribute_name):
|
||||
value = getattr(self, f"_{attribute_name}")
|
||||
try:
|
||||
value = f"{float(value):.3g}"
|
||||
except:
|
||||
pass
|
||||
return value
|
||||
|
||||
def get_number_value(self, attribute_name):
|
||||
@@ -69,7 +65,8 @@ class PolylineUI:
|
||||
if value is None:
|
||||
return None
|
||||
if attribute_name == 'A':
|
||||
return self.get_text_value(attribute_name)
|
||||
value = float(self.get_text_value(attribute_name))
|
||||
return f"{value:.2f}"
|
||||
else:
|
||||
return self.format_input_ui_units(context, value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user