Retrait debug print.
[minwii.git] / src / minwii / widgets / instrumentselector.py
index 52799d0..f8a5e32 100755 (executable)
@@ -60,10 +60,14 @@ class InstrumentSelector(pygame.sprite.LayeredDirty, EventHandlerMixin) :
         pygame.display.flip()
         pygame.mouse.set_visible(False)
         while self._running :
         pygame.display.flip()
         pygame.mouse.set_visible(False)
         while self._running :
-            EventDispatcher.dispatchEvents()
-            dirty = self.draw(pygame.display.get_surface())
-            pygame.display.update(dirty)
-            clock.tick(FRAMERATE)
+            try :
+                EventDispatcher.dispatchEvents()
+                dirty = self.draw(pygame.display.get_surface())
+                pygame.display.update(dirty)
+                clock.tick(FRAMERATE)
+            except KeyboardInterrupt :
+                self.stop()
+                raise
     
     def stop(self) :
         self._running = False
     
     def stop(self) :
         self._running = False