From 0823a95da37cc0cf9d0490a3a3c6c0e0e0d0e11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 7 Jan 2015 13:08:22 +0000 Subject: [PATCH] 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 Tested-by: Michael Stahl --- sw/source/core/doc/doclay.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 58cff5c..4dd987d 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 ) -- 1.9.3