Merge pull request #6619 from matthijskooijman/draft-misc-fixes

Draft: Misc fixes
This commit is contained in:
Yorik van Havre
2022-03-23 10:30:12 +01:00
committed by GitHub
3 changed files with 6 additions and 7 deletions

View File

@@ -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,

View File

@@ -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"]:

View File

@@ -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