Minor bugfixes in Arch & Draft

This commit is contained in:
Yorik van Havre
2016-08-26 15:10:33 -03:00
parent 61561d1b75
commit 3cff94b046
3 changed files with 11 additions and 4 deletions

View File

@@ -4522,8 +4522,11 @@ class _ViewProviderWire(_ViewProviderDraft):
self.coords.scaleFactor.setValue((s,s,s))
rn.addChild(self.pt)
else:
self.pt.removeChild(self.symbol)
rn.removeChild(self.pt)
if self.symbol:
if self.pt.findChild(self.symbol) != -1:
self.pt.removeChild(self.symbol)
if rn.findChild(self.pt) != -1:
rn.removeChild(self.pt)
_ViewProviderDraft.onChanged(self,vobj,prop)
return

View File

@@ -4608,8 +4608,9 @@ class Draft_Slope():
if not lp:
lp = p
else:
z = pc*FreeCAD.Vector(p.x,p.y,lp.z).Length
lp = FreeCAD.Vector(p.x,p.y,z)
v = p.sub(lp)
z = pc*FreeCAD.Vector(v.x,v.y,0).Length
lp = FreeCAD.Vector(p.x,p.y,lp.z+z)
np.append(lp)
obj.Points = np
FreeCAD.ActiveDocument.commitTransaction()