Don't let print progress report 100% until the print is done.
This commit is contained in:
parent
5cce6e1f7a
commit
cce58be724
1 changed files with 9 additions and 1 deletions
|
|
@ -102,7 +102,15 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
// Flag for redraw
|
||||
this.Invalidate();
|
||||
|
||||
percentCompleteWidget.Text = $"{CompletedRatio * 100:0}%";
|
||||
double percentComplete = CompletedRatio * 100;
|
||||
if (percentComplete < 99)
|
||||
{
|
||||
percentCompleteWidget.Text = $"{percentComplete:0}%";
|
||||
}
|
||||
else // let's show the extra decimal during the last perecent
|
||||
{
|
||||
percentCompleteWidget.Text = $"{Math.Min(99.9, percentComplete):0.0}%";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue