MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / setTextAndFraction

Method setTextAndFraction

libs/wxutil/ModalProgressDialog.cpp:47–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void ModalProgressDialog::setTextAndFraction(const std::string& text, double fraction)
48{
49 if (WasCancelled())
50 {
51 throw OperationAbortedException(_("Operation cancelled by user"));
52 }
53
54 if (fraction < 0)
55 {
56 fraction = 0.0;
57 }
58 else if (fraction > 1.0)
59 {
60 fraction = 1.0;
61 }
62
63 int newValue = static_cast<int>(fraction * 100);
64
65 Update(newValue, text);
66 Fit();
67}
68
69} // namespace

Callers 4

setMessageAndProgressMethod · 0.80
visitMethod · 0.80
visitMethod · 0.80
performMethod · 0.80

Calls 2

_Function · 0.50

Tested by

no test coverage detected