Clear light toolbar when the tool is cancelled.
authorSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 14:21:39 +0000 (16:21 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 10 Sep 2016 14:21:39 +0000 (16:21 +0200)
tabakrolletjie/scenes/day.py

index 4cc42f893d8dc1203a330fb401a25fd01ad18e1a..968f241c97d32247611749e88713612fcc6af8af 100644 (file)
@@ -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: