Only change mode after performing action.
authorJeremy Thurgood <firxen@gmail.com>
Tue, 13 May 2014 18:01:14 +0000 (20:01 +0200)
committerJeremy Thurgood <firxen@gmail.com>
Tue, 13 May 2014 18:01:14 +0000 (20:01 +0200)
naja/widgets/info_area.py

index 317dfc631cf34ce52ce8d4aa0b7bf3f12be43d5e..58068d75429620a7eb40842d741d4f0e05987472 100644 (file)
@@ -83,9 +83,9 @@ class InfoAreaWidget(Widget):
             return super(InfoAreaWidget, self).handle_event(ev)
         if ev.type == pgl.KEYDOWN:
             if ev.key in (pgl.K_RETURN, pgl.K_KP_ENTER):
-                self.state.gameboard.change_mode()
                 self.card.actions[self.chosen].perform_action(
                     self.state.gameboard, self.card)
+                self.state.gameboard.change_mode()
                 InvalidateTheWorld.post()
                 return True
             if ev.key in (pgl.K_UP, pgl.K_w):