From db7c21e951ef0ca8d1e53d60d232965e5c2cb822 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Thu, 20 Dec 2001 19:41:54 +0000 Subject: [PATCH] Clip at 100%, not at 100 calls. svn: r647 --- src/Report.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Report.py b/src/Report.py index 66966a50b..391db1e39 100644 --- a/src/Report.py +++ b/src/Report.py @@ -111,14 +111,15 @@ class Report: # Setup the progress bar limits self.pbar = self.pxml.get_widget("progressbar") self.pbar.configure(0.0,0.0,total) + self.pbar_max = total self.pbar_index = 0.0 def progress_bar_step(self): """Click the progress bar over to the next value. Be paranoid and insure that it doesn't go over 100%.""" self.pbar_index = self.pbar_index + 1.0 - if (self.pbar_index > 100.0): - self.pbar_index = 100.0 + if (self.pbar_index > self.pbar_max): + self.pbar_index = self.pbar_max self.pbar.set_value(self.pbar_index) def progress_bar_done(self):