From 26d536eb55d4fc847a8c83660fa0de7c4b077bf3 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 4 Mar 2014 12:34:23 +0100 Subject: add Bar.invalidate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- examples/moderate | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'examples/moderate') diff --git a/examples/moderate b/examples/moderate index d47c704..1ab25e6 100644 --- a/examples/moderate +++ b/examples/moderate @@ -220,10 +220,7 @@ pattern = [ '%s │ %.2f │ %s │ %s │ %s │ %s }{ %s │ %s │ %s │ %s' start_ = start def start(): start_() - def refresh(): - if redraw(): - get_display().flush() - async(lambda : clock_.continuous_sync(refresh)) + async(lambda : clock_.continuous_sync(lambda : bar.invalidate())) HEIGHT = len(pattern) * 12 pattern = '\n'.join([p.replace('}{', '\0') for p in pattern]) -- cgit v1.2.3-70-g09d2