diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-05-28 15:32:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-28 15:55:22 +0100 |
commit | 64b07d99aa0b31b3d04519afe6afe0cdf36bcd6f (patch) | |
tree | 3711799706d393ccd9242035ea3ad0f1f4f5962e | |
parent | d93c8739e899f15eadc6e348b41be07253bd0357 (diff) |
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
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 9b3a9e307c44..b6dbcdc8a08a 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -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; } |