pause notifications while undoing to keep a11y out until we're done

Block them together and announce after undoing that all is done.  This stops
a11y trampling in before we're actually finished, querying for the new text,
which unsets the invalid flags as the new layout is now up-to-date, but
unfortunately results in the view not redrawing as the layout is apparently
valid and doesn't need to be redrawn.

To reproduce, enter a drawing rectangle in draw, enter some text, and (without
leaving edit more) press ctrl-z. The text appears to not change. But the model
has changed except the view didn't get to hear about it because a11y swooped in
between that model change and the view checking to see if the model changed.
And the format update there unsets the model-changed flag.

Change-Id: If2552ef3680b9bd64a2e28a3e9cdbb9e2d45f329
This commit is contained in:
Caolán McNamara
2013-05-28 15:32:19 +01:00
parent d93c8739e8
commit 64b07d99aa

View File

@@ -735,7 +735,14 @@ public:
void EnableUndo( bool bEnable );
bool IsUndoEnabled() { return bUndoEnabled; }
void SetUndoMode( bool b ) { bIsInUndo = b; }
void SetUndoMode( bool b )
{
bIsInUndo = b;
if (bIsInUndo)
EnterBlockNotifications();
else
LeaveBlockNotifications();
}
bool IsInUndo() { return bIsInUndo; }
void SetCallParaInsertedOrDeleted( bool b ) { bCallParaInsertedOrDeleted = b; }