Single measure tool now show x,y and z formatted values.

This commit is contained in:
Bruno Perdigão
2024-10-04 12:22:11 -03:00
parent d4848f26f6
commit 79a8fb1f7f
@@ -573,7 +573,8 @@ class PolylineDecorator:
if (i == 0 and direction.x < 0) or (i == 1 and direction.y < 0) or (i == 2 and direction.z < 0):
value = -value
prefix = "xyz"[i]
text = f"{prefix}: {str(value)}"
formatted_value = self.input_ui.format_input_ui_units(context, value)
text = f"{prefix}: {formatted_value}"
text_length = blf.dimensions(self.font_id, text)
self.draw_text_background(context, dim_text_coords, text_length)
blf.draw(self.font_id, text)