Undoing Paragraph Formatting
I may just be missing something simple here, but I'm not having any luck undoing (via FlowOperation.undo()) any paragraph formatting. This is using the TLF that comes with Flex SDK 4.0.0.5489.
I'm applying all my FlowOperations via the EditManager, for example using editManager.applyLeafFormat() to apply bold/italic/fonts etc, and calling undo() on these works fine.
However when I use applyFormat/applyFormatToElement() and specify not a leaf format, but a paragraph format (for example when applying a leftMargin to a ParagraphElement), I get a FlowOperationEvent dispatched, and an addition to the UndoManager's stack, but calling undo() has no effect on the TextFlow leaving me with the modified paragraph(s) but no way to undo.
Does anyone know why these Paragraph formatting operations would be one-way only?
I'm also thinking this could be something to do with the SelectionState, it's not very clear how/why you need to specify a SelectionState when calling applyFormatToElement() given you are providing the Element you would like to apply it to. Can anyone describe the role of the SelectionState in this case and perhaps whether this could be affecting the undo?
Just to provide some extra info, I am generally applying my ParagraphFormat-ing via CompositeOperations and I'm using a combination of element.getAbsoluteStart() and element.textLength to get my SelectionState when applying paragraph formats to certain elements that are *not* the current selectionState as defined by the EditManager.
