changeset 88:c95462c21966

primitivus (menu): MENU_ROLLER_(UP,DOWN) are not transmitted to next widget anymore
author Goffi <goffi@goffi.org>
date Mon, 08 Sep 2014 15:42:23 +0200
parents a0dbf973befa
children 2141f07b5fdd
files urwid_satext/sat_widgets.py
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/urwid_satext/sat_widgets.py	Sat Sep 06 17:34:43 2014 +0200
+++ b/urwid_satext/sat_widgets.py	Mon Sep 08 15:42:23 2014 +0200
@@ -840,14 +840,16 @@
 
     def keypress(self, size, key):
         if key==a_key['MENU_ROLLER_UP']:
-            if self.columns.get_focus_column()==0 and self.selected > 0:
-                self.selected -= 1
-                self._showSelected()
+            if self.columns.get_focus_column()==0:
+                if self.selected > 0:
+                    self.selected -= 1
+                    self._showSelected()
                 return
         elif key==a_key['MENU_ROLLER_DOWN']:
-            if self.columns.get_focus_column()==0 and self.selected < len(self.name_list)-1:
-                self.selected += 1
-                self._showSelected()
+            if self.columns.get_focus_column()==0:
+                if self.selected < len(self.name_list)-1:
+                    self.selected += 1
+                    self._showSelected()
                 return
         elif key==a_key['MENU_ROLLER_RIGHT']:
             if self.columns.get_focus_column()==0 and \