diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-07 13:13:12 +0000 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-01-07 13:44:29 +0000 |
commit | 5a93387b70e563fe1b5191d20524dd1d0dfec11b (patch) | |
tree | ba4720a55ebe3271c5a25902cf6d696d1b32b17c | |
parent | ed73e365e20d0ec21caf8806e0caba8a1f8dc085 (diff) |
Resolves: fdo#73165 don't restart timer if already running
If the timer is already running and you restart it then it starts counting down
again so the timeout occasion just keeps getting pushed out indefinitely.
(cherry picked from commit fd0577e6b65cfd948b2fbe16fa1bd06fe0c635b9)
Conflicts:
sw/source/core/doc/DocumentTimerManager.cxx
Change-Id: I964beb0c4756c7bce1e29bdf06cbe9a593ba79cf
Reviewed-on: https://gerrit.libreoffice.org/13793
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | sw/source/core/doc/DocumentTimerManager.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx index c9f6c16e52f1..07aa0aa449e1 100644 --- a/sw/source/core/doc/DocumentTimerManager.cxx +++ b/sw/source/core/doc/DocumentTimerManager.cxx @@ -72,9 +72,11 @@ void DocumentTimerManager::UnblockIdling() maIdleTimer.Start(); } -void DocumentTimerManager::StartBackgroundJobs() { +void DocumentTimerManager::StartBackgroundJobs() +{ // Trigger DoIdleJobs(), asynchronously. - maIdleTimer.Start(); + if (!maIdleTimer.IsActive()) //fdo#73165 if the timer is already running don't restart from 0 + maIdleTimer.Start(); } IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer *, pTimer ) |