Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/mintpy/objects/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ def update_amount(self, newAmount=0, suffix=''):

# Figure out the new percent done (round to an integer)
diffFromMin = float(self.amount - self.min)
percentDone = (diffFromMin / float(self.span)) * 100.0
if self.span == 0:
percentDone = 100
else:
percentDone = (diffFromMin / float(self.span)) * 100.0
percentDone = int(np.round(percentDone))
percentDone = max(0, min(100, percentDone))

# Figure out how many hash bars the percentage should be
allFull = self.width - 2 - 18
Expand Down