diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:26:50 +0200 |
commit | 669df123648aaa6aeccc70206b5417bc48b4e9ae (patch) | |
tree | 463c107a8d6405020bb304f7a7253e6b64afeee0 /lib/status_handler.h | |
parent | 5.18 (diff) | |
download | FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.gz FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.tar.bz2 FreeFileSync-669df123648aaa6aeccc70206b5417bc48b4e9ae.zip |
5.19
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 */ } |