projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41d4a80
)
Work around crash trying to set percentages to > 100.
author
Carl Hetherington
<cth@carlh.net>
Tue, 29 Oct 2013 09:39:36 +0000
(09:39 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 29 Oct 2013 09:39:36 +0000
(09:39 +0000)
src/wx/job_manager_view.cc
patch
|
blob
|
history
diff --git
a/src/wx/job_manager_view.cc
b/src/wx/job_manager_view.cc
index bd0554f45f056c34c336dfac6b3de7cb058aace4..7cfcf3423ce9d2fdaba23d90290a1920011c32a9 100644
(file)
--- a/
src/wx/job_manager_view.cc
+++ b/
src/wx/job_manager_view.cc
@@
-31,6
+31,7
@@
using std::string;
using std::list;
using std::map;
+using std::min;
using std::cout;
using boost::shared_ptr;
using boost::weak_ptr;
@@
-105,7
+106,8
@@
private:
_name->SetLabelMarkup (std_to_wx (n));
_last_name = n;
}
- _gauge->SetValue (p * 100);
+ int const pp = min (100.0f, p * 100);
+ _gauge->SetValue (pp);
}
_table->Layout ();