Fix segfault on missing Anchor view

- test script did not create Anchor(Front) view.  DPG/DVP did not
  handle missing Anchor properly
This commit is contained in:
wandererfan
2019-03-05 12:51:00 -05:00
committed by wmayer
parent 198c2258d4
commit 7189b8ebc0
4 changed files with 28 additions and 10 deletions

View File

@@ -42,9 +42,17 @@ def DProjGroupTest():
print("making a projection group")
group = FreeCAD.ActiveDocument.addObject('TechDraw::DrawProjGroup','ProjGroup')
rc = page.addView(group)
print("Group created")
group.Source = [fusion]
print("adding views")
frontView = group.addProjection("Front") ##need an Anchor
print("added Front")
#update group
group.Anchor.Direction = FreeCAD.Vector(0,0,1)
group.Anchor.RotationVector = FreeCAD.Vector(1,0,0)
leftView = group.addProjection("Left")
print("added Left")
topView = group.addProjection("Top")