Generation set before finalizeDo()
We are running into an issue where undo isn't working after inserting an InlineGraphicElement.
It appears that updateAllControllers gets called in finalizeDo() which in turn kicks off preCompose on StandardFlowComposer. PreCompose() calls the normalize function on a TextFlow. Then on the span thats after our the InlineGraphicElement the userStyles property is set to the userStyle specified on the InlineGraphicElement which causes a resetting of the generation number and screws up the undo stack.
I noticed in doInternal() in EditManager there is this comment:
// This has to be done after the normalize, because normalize increments the generation number
First of all it doesn't seem quite right to do a normalize() inside of preCompose() of TextFlow since normalize() changes the model and it doesn't seem quite right to call a function to update the model inside of composition.
If that is still the desired functionality then could we get the setting of the generation during an operation to be done after the finalizeDo() so the generation numbers will be in sync?
Thanks,
Joel
