changeset 98:7c3f43bfc0a8

Only accept single keys for project selection Avoids inserting e.g. del key
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 12 Sep 2011 13:32:15 +0200
parents 99639833968d
children 4912568f9048
files getan/states.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/getan/states.py	Thu Sep 01 09:03:32 2011 +0200
+++ b/getan/states.py	Mon Sep 12 13:32:15 2011 +0200
@@ -82,7 +82,7 @@
             return ExitState(self.controller, self.view)
 
         else:
-            if len(key) > 0:
+            if len(key) > 0 and len(key[0]) == 1:
                 select_proj = SelectProjectState(self.controller, self.view, key[0])
                 return select_proj.check_key()
         return self
@@ -122,9 +122,8 @@
         if 'esc' in key:
             self.reset()
             return PausedProjectsState(self.controller, self.view)
-
         else:
-            if len(key) > 0:
+            if len(key) > 0 and len(key[0]) == 1:
                 self.proj_keys += key[0]
                 self.set_footer_text()
                 return self.check_key()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)