Dear sirs,
The undo manager, by default, saves the action to be later undone later? In my application is not work perfectly. I write the text,
change something (formatting or positioning), and when I call the undo, this not is undone perfectly.
The images attached, shows my actions sorted .
1 - Initial text
2 - Text Edited
3 - Undo max
NOTE: Was not exceeded the limit of 25 actions.
The source code was also be attached.
Problems with UndoManagerAny ideas?
Problems with UndoManagerThe UndoManager is only able to undo changes made with the EditManager. The EditManager groups changes into FlowOperations, where each operation is able to undo itself. This is not possible with changes made directly to the FlowElements, as done in your example. If you change your example to call EditManager.applyLeafElement, then your changes will be undoable. Note that any direct changes you make to the TextFlow will nullify the undo; in order for undo to work, you have to make all your changes with the EditManager.
- robin
Sorry, did not understand right. The solution would use applyFormatToElement instead of applyLeafFormat? I dont know other way to apply formatting in textflow.
Thanks for your help!
- Marcos
Tried using other method but is not working.
Someone know a solution?
Hi,
I downloaded your example - yes sorry for the delay.
I can't unzip it - windows explorer and cygwin unzip both claim its corrupt.?Posting files to the forums doesn't seem to be working particularly well - how about posting it elsewhere with a link?
Note there is a known bug in applyFormatToElement - its always applying the format to the TextFlow.?It was fixed last week but likely that update hasn't been posted yet.?But that won't have fixed any undo bugs.
Thanks,
Richard
No comments:
Post a Comment