[master] [PATCH] Redraw screen in case of valid input and nothing new scheduled

Vratislav Podzimek vpodzime at redhat.com
Tue Mar 5 13:35:59 UTC 2013


If the screen successfully processes the input and doesn't schedule
another screen, it should be redrawn, so that the new state is shown.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 pyanaconda/ui/tui/simpleline/base.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/tui/simpleline/base.py b/pyanaconda/ui/tui/simpleline/base.py
index 5e2e8be..131a54a 100644
--- a/pyanaconda/ui/tui/simpleline/base.py
+++ b/pyanaconda/ui/tui/simpleline/base.py
@@ -269,7 +269,7 @@ class App(object):
             except Exception as ex:
                 send_exception(self.queue, ex)
                 return False
-            
+
         else:
             # this can happen only in case there was invalid input and prompt
             # should be shown again
@@ -341,6 +341,10 @@ class App(object):
                 # increment the error counter
                 if not self.input(self._screens[-1][1], c):
                     error_counter += 1
+                else:
+                    # input was successfully processed, but no other screen was
+                    # scheduled, just redraw the screen to display current state
+                    self.redraw()
 
                 # redraw the screen after 5 bad inputs
                 if error_counter >= 5:
-- 
1.7.11.7



More information about the anaconda-patches mailing list