diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/draw/dcontact.cxx | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index f5d66b4b4b0a..e3e9a6e2f5b8 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1058,28 +1058,30 @@ void SwDrawContact::Changed( const SdrObject& rObj, } //Put on Action, but not if presently anywhere an action runs. - SwViewShell *pSh = nullptr, *pOrg; + bool bHasActions(true); SwRootFrm *pTmpRoot = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); if ( pTmpRoot && pTmpRoot->IsCallbackActionEnabled() ) { - pOrg = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); - pSh = pOrg; - if ( pSh ) - do - { if ( pSh->Imp()->IsAction() || pSh->Imp()->IsIdleAction() ) - pSh = nullptr; - else - pSh = pSh->GetNext(); - - } while ( pSh && pSh != pOrg ); - + SwViewShell* const pSh = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell(); if ( pSh ) + { + for(SwViewShell& rShell : pSh->GetRingContainer() ) + { + if ( rShell.Imp()->IsAction() || rShell.Imp()->IsIdleAction() ) + { + bHasActions = true; + break; + } + bHasActions = false; + } + } + if(!bHasActions) pTmpRoot->StartAllAction(); } SdrObjUserCall::Changed( rObj, eType, rOldBoundRect ); _Changed( rObj, eType, &rOldBoundRect ); //Attention, possibly suicidal! - if ( pSh ) + if(!bHasActions) pTmpRoot->EndAllAction(); } |