Issue #84: fix scale computing.

This commit is contained in:
Sergey Vartanov 2021-09-18 20:29:35 +03:00
parent aa82353f00
commit ef8e0a89e2

View file

@ -496,6 +496,9 @@ class Roads:
def draw(self, svg: Drawing, flinger: Flinger) -> None: def draw(self, svg: Drawing, flinger: Flinger) -> None:
"""Draw whole road system.""" """Draw whole road system."""
if not self.roads:
return
scale: float = flinger.get_scale(self.roads[0].nodes[0].coordinates) scale: float = flinger.get_scale(self.roads[0].nodes[0].coordinates)
layered_roads: dict[float, list[Road]] = {} layered_roads: dict[float, list[Road]] = {}
for road in self.roads: for road in self.roads: