summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-07 13:08:22 +0000
committerAndras Timar <andras.timar@collabora.com>2015-01-08 15:09:41 +0100
commitaa35d24c196e25ae03cf482d67f098d7323439b9 (patch)
treec3a552361ae074d74612338c3f6e1b917e100864 /sw
parent5096e8b5395233bfdf99e41dc56f9efd42ac85e9 (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> (cherry picked from commit 0823a95da37cc0cf9d0490a3a3c6c0e0e0d0e11e)
Diffstat (limited to 'sw')
-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 )