diff options
Diffstat (limited to 'lib/status_handler.h')
-rw-r--r-- | lib/status_handler.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/status_handler.h b/lib/status_handler.h index ed496824..c19935b1 100644 --- a/lib/status_handler.h +++ b/lib/status_handler.h @@ -16,13 +16,12 @@ namespace zen { bool updateUiIsAllowed(); //test if a specific amount of time is over -void updateUiNow(); //do the updating /* Updating GUI is fast! time per single call to ProcessCallback::forceUiRefresh() - - Comparison 25 µs - - Synchronization 0.6 ms (despite complex graph control!) + - Comparison 0.025 ms + - Synchronization 0.74 ms (despite complex graph control!) */ //gui may want to abort process @@ -72,11 +71,13 @@ protected: virtual void requestUiRefresh() { - if (updateUiIsAllowed()) //test if specific time span between ui updates is over + if (abortRequested) //triggered by requestAbortion() + { + forceUiRefresh(); + abortThisProcess(); + } + else if (updateUiIsAllowed()) //test if specific time span between ui updates is over forceUiRefresh(); - - if (abortRequested) //check *after* GUI update, to have up-to-date screen - abortThisProcess(); //triggered by requestAbortion() } virtual void reportStatus(const std::wstring& text) { statusText_ = text; requestUiRefresh(); /*throw AbortThisProcess */ } |