Kaydet (Commit) 3ed4078a authored tarafından Michael Stahl's avatar Michael Stahl

SwLayAction: there can be only one, so assert that

Requires tweaking the SwLayIdle code a bit, where an action is kept
alive a bit after it's done, which would trigger the assertion.

Change-Id: Ic5c8f90bc101b9d73cfde9691b2bbf405a001393
üst a2e1505c
......@@ -300,6 +300,7 @@ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewImp *pI ) :
// OD 14.04.2003 #106346# - init new flag <mbFormatCntntOnInterrupt>.
mbFormatCntntOnInterrupt = false;
assert(!pImp->pLayAct); // there can be only one SwLayAction
pImp->pLayAct = this; // register there
}
......@@ -2169,11 +2170,15 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
pSh = (SwViewShell*)pSh->GetNext();
} while ( pSh != pImp->GetShell() );
SwLayAction aAction( pRoot, pImp );
aAction.SetInputType( VCL_INPUT_ANY );
aAction.SetIdle( true );
aAction.SetWaitAllowed( false );
aAction.Action();
bool bInterrupt(false);
{
SwLayAction aAction( pRoot, pImp );
aAction.SetInputType( VCL_INPUT_ANY );
aAction.SetIdle( true );
aAction.SetWaitAllowed( false );
aAction.Action();
bInterrupt = aAction.IsInterrupt();
}
// Further start/end actions only happen if there were paints started
// somewhere or if the visibility of the CharRects has changed.
......@@ -2263,7 +2268,7 @@ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) :
} while ( pSh != pImp->GetShell() );
}
if ( !aAction.IsInterrupt() )
if (!bInterrupt)
{
if ( !DoIdleJob( WORD_COUNT, false ) )
if ( !DoIdleJob( SMART_TAGS, false ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment