summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-07 13:13:12 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-01-07 13:14:02 +0000
commitfd0577e6b65cfd948b2fbe16fa1bd06fe0c635b9 (patch)
tree973565f55086d5a1a01bcd22b9b1893d4e827acf
parent28b61d7a2839aebc7458312d312dc6cdb03a8b3f (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. Change-Id: I964beb0c4756c7bce1e29bdf06cbe9a593ba79cf
-rw-r--r--sw/source/core/doc/DocumentTimerManager.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx
index 5c97d2c60c46..a2ed9c4ba972 100644
--- a/sw/source/core/doc/DocumentTimerManager.cxx
+++ b/sw/source/core/doc/DocumentTimerManager.cxx
@@ -72,9 +72,11 @@ void DocumentTimerManager::UnblockIdling()
maIdle.Start();
}
-void DocumentTimerManager::StartBackgroundJobs() {
+void DocumentTimerManager::StartBackgroundJobs()
+{
// Trigger DoIdleJobs(), asynchronously.
- maIdle.Start();
+ if (!maIdle.IsActive()) //fdo#73165 if the timer is already running don't restart from 0
+ maIdle.Start();
}
IMPL_LINK( DocumentTimerManager, DoIdleJobs, Timer *, pTimer )