From ac8c928a5b976dedf06f33ea2dcf1013ab7d09c7 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 14 Feb 2011 12:25:43 +0100 Subject: [PATCH] don't always refresh on __init__ --- deluge/ui/console/modes/basemode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deluge/ui/console/modes/basemode.py b/deluge/ui/console/modes/basemode.py index 24cb3cca4..2dd9b87d7 100644 --- a/deluge/ui/console/modes/basemode.py +++ b/deluge/ui/console/modes/basemode.py @@ -72,7 +72,7 @@ class CursesStdIO(object): class BaseMode(CursesStdIO): - def __init__(self, stdscr, encoding=None): + def __init__(self, stdscr, encoding=None, do_refresh=True): """ A mode that provides a curses screen designed to run as a reader in a twisted reactor. This mode doesn't do much, just shows status bars and "Base Mode" on the screen @@ -116,7 +116,8 @@ class BaseMode(CursesStdIO): colors.init_colors() # Do a refresh right away to draw the screen - self.refresh() + if do_refresh: + self.refresh() def on_resize_norefresh(self, *args): log.debug("on_resize_from_signal")