mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-30 03:59:55 +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):
|
def get_text_value(self, attribute_name):
|
||||||
value = getattr(self, f"_{attribute_name}")
|
value = getattr(self, f"_{attribute_name}")
|
||||||
try:
|
|
||||||
value = f"{float(value):.3g}"
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def get_number_value(self, attribute_name):
|
def get_number_value(self, attribute_name):
|
||||||
@@ -69,7 +65,8 @@ class PolylineUI:
|
|||||||
if value is None:
|
if value is None:
|
||||||
return None
|
return None
|
||||||
if attribute_name == 'A':
|
if attribute_name == 'A':
|
||||||
return self.get_text_value(attribute_name)
|
value = float(self.get_text_value(attribute_name))
|
||||||
|
return f"{value:.2f}"
|
||||||
else:
|
else:
|
||||||
return self.format_input_ui_units(context, value)
|
return self.format_input_ui_units(context, value)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user