From a06f1128fdcb8c10298291718060152263e0d924 Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 10 Sep 2016 16:21:39 +0200 Subject: [PATCH] Clear light toolbar when the tool is cancelled. --- tabakrolletjie/scenes/day.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tabakrolletjie/scenes/day.py b/tabakrolletjie/scenes/day.py index 4cc42f8..968f241 100644 --- a/tabakrolletjie/scenes/day.py +++ b/tabakrolletjie/scenes/day.py @@ -96,7 +96,8 @@ class DayScene(BaseScene): x += step tools.append(ImageButton( - '32', 'night.png', name='start night', pos=(SCREEN_SIZE[0] - 100, y))) + '32', 'night.png', name='start night', + pos=(SCREEN_SIZE[0] - 100, y))) tools.append(ImageButton( '32', 'exit.png', name='exit', pos=(SCREEN_SIZE[0] - 50, y))) return tools @@ -263,6 +264,7 @@ class DayScene(BaseScene): elif self._tool: # Unset tool self._tool = None + self._clear_light_toolbar() self._unset_cursor() elif ev.type == pgl.MOUSEMOTION: if self._dragging: -- 2.34.1