Merge remote-tracking branch 'origin/master' into feature_slice_to_png

This commit is contained in:
tamasmeszaros 2018-07-18 10:14:15 +02:00
commit 9559ad77e5
121 changed files with 18093 additions and 3459 deletions

View file

@ -224,7 +224,7 @@ class Wrapper: public IProgressIndicator, public wxEvtHandler {
}
void _state(unsigned st) {
if( st <= max() ) {
if( st <= IProgressIndicator::max() ) {
Base::state(st);
if(!gauge_->IsShown()) showProgress(true);
@ -261,7 +261,14 @@ public:
}
virtual void state(float val) override {
if(val >= 1.0) state(unsigned(val));
state(unsigned(val));
}
virtual void max(float val) override {
if(val > 1.0) {
gauge_->SetRange(static_cast<int>(val));
IProgressIndicator::max(val);
}
}
void state(unsigned st) {
@ -269,7 +276,9 @@ public:
auto evt = new wxCommandEvent(PROGRESS_STATUS_UPDATE_EVENT, id_);
evt->SetInt(st);
wxQueueEvent(this, evt);
} else _state(st);
} else {
_state(st);
}
}
virtual void message(const string & msg) override {
@ -279,7 +288,7 @@ public:
virtual void message_fmt(const string& fmt, ...) override {
va_list arglist;
va_start(arglist, fmt);
message_ = wxString::Format(wxString(fmt), arglist);
message_ = wxString::Format(fmt, arglist);
va_end(arglist);
}