Skip to main content
Known Participant
January 7, 2010
Question

Generation set before finalizeDo()

  • January 7, 2010
  • 1 reply
  • 504 views

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

This topic has been closed for replies.

1 reply

Adobe Employee
January 8, 2010

Can you post some example code that shows this problem? I can't reproduce this

just by inserting or modifying inline graphics.

Thanks!

- robin