Cleanup treestyle to work across gramps versions
svn: r13810
This commit is contained in:
parent
0512137d35
commit
cfec1b2092
@ -600,7 +600,67 @@ class PedigreeView(NavigationView):
|
||||
|
||||
self.dirty = False
|
||||
|
||||
if self.tree_style == 1:
|
||||
if self.tree_style not in (0, 1):
|
||||
self.tree_style = 0
|
||||
|
||||
if self.tree_style == 0:
|
||||
pos_2 =(((0,0,1,3),(1,0,3),(2,1,1,1)),
|
||||
((2,0,1,1),None,None),
|
||||
((2,2,1,1),None,None))
|
||||
pos_3 =(((0,2,1,3),(1,1,5),(2,3,1,1)),
|
||||
((2,0,1,3),(3,0,3),(4,1,1,1)),
|
||||
((2,4,1,3),(3,4,3),(4,5,1,1)),
|
||||
((4,0,1,1),None,None),
|
||||
((4,2,1,1),None,None),
|
||||
((4,4,1,1),None,None),
|
||||
((4,6,1,1),None,None))
|
||||
pos_4 =(((0,6,1,3),(1,3,9),(2,5,1,5)),
|
||||
((2,2,1,3),(3,1,5),(4,3,1,1)),
|
||||
((2,10,1,3),(3,9,5),(4,11,1,1)),
|
||||
((4,0,1,3),(5,0,3),(6,1,1,1)),
|
||||
((4,4,1,3),(5,4,3),(6,5,1,1)),
|
||||
((4,8,1,3),(5,8,3),(6,9,1,1)),
|
||||
((4,12,1,3),(5,12,3),(6,13,1,1)),
|
||||
((6,0,1,1),None,None),
|
||||
((6,2,1,1),None,None),
|
||||
((6,4,1,1),None,None),
|
||||
((6,6,1,1),None,None),
|
||||
((6,8,1,1),None,None),
|
||||
((6,10,1,1),None,None),
|
||||
((6,12,1,1),None,None),
|
||||
((6,14,1,1),None,None))
|
||||
pos_5 =(((0,14,1,3),(1,7,17),(2,13,1,5)),
|
||||
((2,6,1,3),(3,3,9),(4,5,1,5)),
|
||||
((2,22,1,3),(3,19,9),(4,21,1,5)),
|
||||
((4,2,1,3),(5,1,5),(6,3,1,1)),
|
||||
((4,10,1,3),(5,9,5),(6,11,1,1)),
|
||||
((4,18,1,3),(5,17,5),(6,19,1,1)),
|
||||
((4,26,1,3),(5,25,5),(6,27,1,1)),
|
||||
((6,0,1,3),(7,0,3),(8,1,1,1)),
|
||||
((6,4,1,3),(7,4,3),(8,5,1,1)),
|
||||
((6,8,1,3),(7,8,3),(8,9,1,1)),
|
||||
((6,12,1,3),(7,12,3),(8,13,1,1)),
|
||||
((6,16,1,3),(7,16,3),(8,17,1,1)),
|
||||
((6,20,1,3),(7,20,3),(8,21,1,1)),
|
||||
((6,24,1,3),(7,24,3),(8,25,1,1)),
|
||||
((6,28,1,3),(7,28,3),(8,29,1,1)),
|
||||
((8,0,1,1),None,None),
|
||||
((8,2,1,1),None,None),
|
||||
((8,4,1,1),None,None),
|
||||
((8,6,1,1),None,None),
|
||||
((8,8,1,1),None,None),
|
||||
((8,10,1,1),None,None),
|
||||
((8,12,1,1),None,None),
|
||||
((8,14,1,1),None,None),
|
||||
((8,16,1,1),None,None),
|
||||
((8,18,1,1),None,None),
|
||||
((8,20,1,1),None,None),
|
||||
((8,22,1,1),None,None),
|
||||
((8,24,1,1),None,None),
|
||||
((8,26,1,1),None,None),
|
||||
((8,28,1,1),None,None),
|
||||
((8,30,1,1),None,None))
|
||||
elif self.tree_style == 1:
|
||||
# format of the definition is:
|
||||
# ((each box of the pedigree has a node here),
|
||||
# ((person data), (connection line), (marriage data)),
|
||||
@ -662,63 +722,6 @@ class PedigreeView(NavigationView):
|
||||
((8,26,3,1),None,None),
|
||||
((8,28,3,1),None,None),
|
||||
((8,30,3,1),None,None),)
|
||||
elif self.tree_style == 0:
|
||||
pos_2 =(((0,0,1,3),(1,0,3),(2,1,1,1)),
|
||||
((2,0,1,1),None,None),
|
||||
((2,2,1,1),None,None))
|
||||
pos_3 =(((0,2,1,3),(1,1,5),(2,3,1,1)),
|
||||
((2,0,1,3),(3,0,3),(4,1,1,1)),
|
||||
((2,4,1,3),(3,4,3),(4,5,1,1)),
|
||||
((4,0,1,1),None,None),
|
||||
((4,2,1,1),None,None),
|
||||
((4,4,1,1),None,None),
|
||||
((4,6,1,1),None,None))
|
||||
pos_4 =(((0,6,1,3),(1,3,9),(2,5,1,5)),
|
||||
((2,2,1,3),(3,1,5),(4,3,1,1)),
|
||||
((2,10,1,3),(3,9,5),(4,11,1,1)),
|
||||
((4,0,1,3),(5,0,3),(6,1,1,1)),
|
||||
((4,4,1,3),(5,4,3),(6,5,1,1)),
|
||||
((4,8,1,3),(5,8,3),(6,9,1,1)),
|
||||
((4,12,1,3),(5,12,3),(6,13,1,1)),
|
||||
((6,0,1,1),None,None),
|
||||
((6,2,1,1),None,None),
|
||||
((6,4,1,1),None,None),
|
||||
((6,6,1,1),None,None),
|
||||
((6,8,1,1),None,None),
|
||||
((6,10,1,1),None,None),
|
||||
((6,12,1,1),None,None),
|
||||
((6,14,1,1),None,None))
|
||||
pos_5 =(((0,14,1,3),(1,7,17),(2,13,1,5)),
|
||||
((2,6,1,3),(3,3,9),(4,5,1,5)),
|
||||
((2,22,1,3),(3,19,9),(4,21,1,5)),
|
||||
((4,2,1,3),(5,1,5),(6,3,1,1)),
|
||||
((4,10,1,3),(5,9,5),(6,11,1,1)),
|
||||
((4,18,1,3),(5,17,5),(6,19,1,1)),
|
||||
((4,26,1,3),(5,25,5),(6,27,1,1)),
|
||||
((6,0,1,3),(7,0,3),(8,1,1,1)),
|
||||
((6,4,1,3),(7,4,3),(8,5,1,1)),
|
||||
((6,8,1,3),(7,8,3),(8,9,1,1)),
|
||||
((6,12,1,3),(7,12,3),(8,13,1,1)),
|
||||
((6,16,1,3),(7,16,3),(8,17,1,1)),
|
||||
((6,20,1,3),(7,20,3),(8,21,1,1)),
|
||||
((6,24,1,3),(7,24,3),(8,25,1,1)),
|
||||
((6,28,1,3),(7,28,3),(8,29,1,1)),
|
||||
((8,0,1,1),None,None),
|
||||
((8,2,1,1),None,None),
|
||||
((8,4,1,1),None,None),
|
||||
((8,6,1,1),None,None),
|
||||
((8,8,1,1),None,None),
|
||||
((8,10,1,1),None,None),
|
||||
((8,12,1,1),None,None),
|
||||
((8,14,1,1),None,None),
|
||||
((8,16,1,1),None,None),
|
||||
((8,18,1,1),None,None),
|
||||
((8,20,1,1),None,None),
|
||||
((8,22,1,1),None,None),
|
||||
((8,24,1,1),None,None),
|
||||
((8,26,1,1),None,None),
|
||||
((8,28,1,1),None,None),
|
||||
((8,30,1,1),None,None))
|
||||
|
||||
# Build ancestor tree only one for all different sizes
|
||||
lst = [None]*31
|
||||
|
Loading…
Reference in New Issue
Block a user