kopia lustrzana https://github.com/hholzgra/ocitysmap
prevent size calculaion exception on empty index
rodzic
86e842d759
commit
65d084e5d8
|
|
@ -853,9 +853,12 @@ class GeneralIndexRenderer:
|
|||
font_desc)
|
||||
#print "PREPARE", layout, fascent, fheight, em
|
||||
|
||||
if len(text_lines):
|
||||
width = max(map(lambda x: self._label_width(layout, x), text_lines))
|
||||
# Save some extra space horizontally
|
||||
width += n_em_padding * em
|
||||
else:
|
||||
width = 0
|
||||
|
||||
height = fheight * len(text_lines)
|
||||
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue