summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-07 13:08:22 +0000
committerMichael Stahl <mstahl@redhat.com>2015-01-07 16:46:41 +0000
commit0823a95da37cc0cf9d0490a3a3c6c0e0e0d0e11e (patch)
treeed2f9349595b7fe71b4b84573983160777ca967f
parent177cfe9b602a081f0c3a166e90aace16b868bca3 (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: I907dcc20c6fb4a770deeebba459fe68c24a4ec98 Reviewed-on: https://gerrit.libreoffice.org/13792 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sw/source/core/doc/doclay.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 58cff5cd7375..4dd987df5a24 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1791,9 +1791,11 @@ void SwDoc::UnblockIdling()
maIdleTimer.Start();
}
-void SwDoc::StartBackgroundJobs() {
+void SwDoc::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( SwDoc, DoIdleJobs, Timer *, pTimer )