fanchartdesc: bugfixes after stress test with greek gods
svn: r20420
This commit is contained in:
parent
77e8bee449
commit
789fc4bbed
@ -221,6 +221,7 @@ class FanChartDescWidget(FanChartBaseWidget):
|
|||||||
spname = name_displayer.display(spouse)
|
spname = name_displayer.display(spouse)
|
||||||
else:
|
else:
|
||||||
spname = ''
|
spname = ''
|
||||||
|
spouse = None
|
||||||
if family_handle in self.famhandle2desc:
|
if family_handle in self.famhandle2desc:
|
||||||
#family occurs via father and via mother in the chart, only
|
#family occurs via father and via mother in the chart, only
|
||||||
#first to show and count.
|
#first to show and count.
|
||||||
@ -285,6 +286,15 @@ class FanChartDescWidget(FanChartBaseWidget):
|
|||||||
for data in self.gen2fam[gen-1]:
|
for data in self.gen2fam[gen-1]:
|
||||||
#obtain start and stop of partner
|
#obtain start and stop of partner
|
||||||
partnerdata = self.gen2people[gen-1][data[5]]
|
partnerdata = self.gen2people[gen-1][data[5]]
|
||||||
|
dupfam = data[1]
|
||||||
|
if dupfam:
|
||||||
|
# we don't show the descendants here, but in the first
|
||||||
|
# occurrence of the family
|
||||||
|
nrdescfam = 0
|
||||||
|
nrdescpartner = self.handle2desc[partnerdata[0].handle]
|
||||||
|
nrfam = partnerdata[6]
|
||||||
|
nrdescfam = 0
|
||||||
|
else:
|
||||||
nrdescfam = self.famhandle2desc[data[0].handle]
|
nrdescfam = self.famhandle2desc[data[0].handle]
|
||||||
nrdescpartner = self.handle2desc[partnerdata[0].handle]
|
nrdescpartner = self.handle2desc[partnerdata[0].handle]
|
||||||
nrfam = partnerdata[6]
|
nrfam = partnerdata[6]
|
||||||
@ -346,7 +356,6 @@ class FanChartDescWidget(FanChartBaseWidget):
|
|||||||
elif self.anglealgo == ANGLE_WEIGHT:
|
elif self.anglealgo == ANGLE_WEIGHT:
|
||||||
slice = famslice/(nrdescfam) * (nrdesc + 1)
|
slice = famslice/(nrdescfam) * (nrdesc + 1)
|
||||||
else:
|
else:
|
||||||
print self.anglealgo == ANGLE_WEIGHT,self.anglealgo, ANGLE_WEIGHT
|
|
||||||
raise NotImplementedError, 'Unknown angle algorithm %d' % self.anglealgo
|
raise NotImplementedError, 'Unknown angle algorithm %d' % self.anglealgo
|
||||||
if prevfamdatahandle != parentfamdata[0].handle:
|
if prevfamdatahandle != parentfamdata[0].handle:
|
||||||
#reset the offset
|
#reset the offset
|
||||||
@ -516,7 +525,11 @@ class FanChartDescWidget(FanChartBaseWidget):
|
|||||||
if abs(slice - 2*pi) < 1e-6:
|
if abs(slice - 2*pi) < 1e-6:
|
||||||
full = True
|
full = True
|
||||||
stop_rad = start_rad + slice
|
stop_rad = start_rad + slice
|
||||||
if not dup:
|
if not person:
|
||||||
|
#an family with partner not set. Don't have a color for this,
|
||||||
|
# let's make it transparent
|
||||||
|
r, g, b, a = (255, 255, 255, 0)
|
||||||
|
elif not dup:
|
||||||
r, g, b, a = self.background_box(person, generation, userdata)
|
r, g, b, a = self.background_box(person, generation, userdata)
|
||||||
else:
|
else:
|
||||||
#duplicate color
|
#duplicate color
|
||||||
|
Loading…
Reference in New Issue
Block a user