Draft : fix Label Justification (#13444)

Draft Label ViewObject.Justification property was overriden by Object.StraightDistance property. The Justification in the 3D view was reset after recompute. This commit fixes the problem by setting Object.StraightDistance automatically when ViewObject.Justification is changed and vice versa. Also fixes the frame position when Justification is Center.
This commit is contained in:
alafr
2025-06-24 10:45:46 +02:00
committed by GitHub
parent 96b006a2dd
commit 27c786fef1
2 changed files with 99 additions and 74 deletions

View File

@@ -339,6 +339,9 @@ def make_label(target_point=App.Vector(0, 0, 0),
ViewProviderLabel(new_obj.ViewObject)
h = params.get_param("textheight")
new_obj.ViewObject.FontSize = h
if direction == "Horizontal" and distance > 0:
# StraightDistance and Justification must be in sync.
new_obj.ViewObject.Justification = "Right"
gui_utils.format_object(new_obj)
gui_utils.select(new_obj)