diff --git a/src/Mod/Draft/draftfunctions/svg.py b/src/Mod/Draft/draftfunctions/svg.py index ba34655dfd..dd5238e1fa 100644 --- a/src/Mod/Draft/draftfunctions/svg.py +++ b/src/Mod/Draft/draftfunctions/svg.py @@ -615,7 +615,7 @@ def get_svg(obj, svg_path += 'fill="none" ' svg_path += 'stroke="{}" '.format(stroke) svg_path += 'stroke-width="{}" '.format(linewidth) - svg_path += 'stroke-linecap:square;' + svg_path += 'stroke-linecap="square" ' svg_path += 'd="{}"'.format(path_dir_str) svg_path += '/>' svg += svg_path @@ -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, diff --git a/src/Mod/Draft/draftobjects/shape2dview.py b/src/Mod/Draft/draftobjects/shape2dview.py index 5183da27ce..df08c6ab34 100644 --- a/src/Mod/Draft/draftobjects/shape2dview.py +++ b/src/Mod/Draft/draftobjects/shape2dview.py @@ -184,9 +184,8 @@ class Shape2DView(DraftObject): return nedges def execute(self,obj): - if hasattr(obj,"AutoUpdate"): - if not obj.AutoUpdate: - return True + if not getattr(obj,"AutoUpdate", True): + return True import Part, DraftGeomUtils obj.positionBySupport() pl = obj.Placement @@ -215,7 +214,7 @@ class Shape2DView(DraftObject): if getattr(obj,"VisibleOnly",True): objs = gui_utils.remove_hidden(objs) shapes = [] - if hasattr(obj,"FuseArch") and obj.FuseArch: + if getattr(obj,"FuseArch", False): shtypes = {} for o in objs: if utils.get_type(o) in ["Wall","Structure"]: diff --git a/src/Mod/Draft/draftviewproviders/view_label.py b/src/Mod/Draft/draftviewproviders/view_label.py index 0238363287..571b40e000 100644 --- a/src/Mod/Draft/draftviewproviders/view_label.py +++ b/src/Mod/Draft/draftviewproviders/view_label.py @@ -394,7 +394,7 @@ class ViewProviderLabel(ViewProviderDraftAnnotation): if s: self.arrowpos.scaleFactor.setValue((s, s, s)) - elif prop in "Justification" and "Justification" in properties: + elif prop == "Justification" and "Justification" in properties: if vobj.Justification == "Left": self.text2d.justification = coin.SoText2.LEFT self.text3d.justification = coin.SoAsciiText.LEFT