multi-page: fix index rendering when no streets are present

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@enix.org>
stable
Thomas Petazzoni 2012-03-30 18:19:24 +02:00
rodzic 282b14be02
commit fe3d542fa7
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -86,6 +86,10 @@ class MultiPageStreetIndexRenderer:
if w > max_drawing_width:
max_drawing_width = w
# No street to render, bail out
if max_drawing_width == 0:
return
columns_count = int(self.rendering_area_w / max_drawing_width)
if columns_count == 0:
columns_count = 1