Draft: Fix mixup of TextAlignment vs Justification for Labels

TextAlignment is the vertical alignment, while Justification is the
horizontal alignment. here, get_text was passed the vertical, while it
expected the horizontal. This caused the alignment of a Label to be
wrong in the resulting SVG (e.g. in a TechDraw draft view).

This seems to have been broken since SVG support for Labels was first
introduced in commit 3391a5ea4b (Initial work, only text (no lines)).
This commit is contained in:
Matthijs Kooijman
2021-06-29 15:29:57 +02:00
parent fd8475b1c6
commit be69ec5e00

View File

@@ -641,7 +641,7 @@ def get_svg(obj,
fontname = obj.ViewObject.TextFont
position = get_proj(obj.Placement.Base, plane)
rotation = obj.Placement.Rotation
justification = obj.ViewObject.TextAlignment
justification = obj.ViewObject.Justification
text = obj.Text
svg += svgtext.get_text(plane, techdraw,
stroke, fontsize, fontname,