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