summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/DocumentTimerManager.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2018-11-22 12:48:17 +0000
committerMichael Meeks <michael.meeks@collabora.com>2018-11-22 19:09:12 +0100
commitf19dfaf817556ba28d68c000f3561a2752635727 (patch)
treefd0ba99fd5b0649f5359cf8ac39ced6a39b285c7 /sw/source/core/doc/DocumentTimerManager.cxx
parentfbc95e77d28f8a5a8f6442a64e5e0e52e98612c2 (diff)
Avoid busy-loop related to layout when dragging objects.
Change-Id: I4fb437356bc154cfefc5958592ae5888e24d59c3 Reviewed-on: https://gerrit.libreoffice.org/63804 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sw/source/core/doc/DocumentTimerManager.cxx')
-rw-r--r--sw/source/core/doc/DocumentTimerManager.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx
index d2be24104920..44984c86e583 100644
--- a/sw/source/core/doc/DocumentTimerManager.cxx
+++ b/sw/source/core/doc/DocumentTimerManager.cxx
@@ -108,10 +108,14 @@ DocumentTimerManager::IdleJob DocumentTimerManager::GetNextIdleJob() const
return IdleJob::Grammar;
}
- for ( auto pLayout : m_rDoc.GetAllLayouts() )
+ // If we're dragging re-layout doesn't occur so avoid a busy loop.
+ if (!pShell->HasDrawViewDrag())
{
- if( pLayout->IsIdleFormat() )
- return IdleJob::Layout;
+ for ( auto pLayout : m_rDoc.GetAllLayouts() )
+ {
+ if( pLayout->IsIdleFormat() )
+ return IdleJob::Layout;
+ }
}
SwFieldUpdateFlags nFieldUpdFlag = m_rDoc.GetDocumentSettingManager().getFieldUpdateFlags(true);