2006-10-01 Don Allingham <don@gramps-project.org>
* src/Utils.py: catch divide by zero case * src/ViewManager.py: change change to same page (#410) svn: r7339
This commit is contained in:
@ -972,10 +972,14 @@ class ProgressMeter:
|
||||
"""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 > self.pbar_max):
|
||||
|
||||
if self.pbar_index > self.pbar_max:
|
||||
self.pbar_index = self.pbar_max
|
||||
|
||||
val = int(100*self.pbar_index/self.pbar_max)
|
||||
try:
|
||||
val = int(100*self.pbar_index/self.pbar_max)
|
||||
except ZeroDivisionError:
|
||||
val = 0
|
||||
|
||||
if val != self.old_val:
|
||||
self.pbar.set_text("%d%%" % val)
|
||||
|
Reference in New Issue
Block a user