Answered
Multiple containers for same TextFlow
I have a pretty complex scenario but I should be able to see
what's going wrong here... the question is on the very last line.
I'm building an application where inside an editor users can lay out and edit text, (using things like resize handles and the EditManager for position and selection/typing). The app has a strict MVC implementation and I'm utilising a global undo system via commands so every edit to the text runs through a central mechanism instead of using the UndoManager directly. I'm also generating thumbnail images of this "container" after a certain time period after user activity, in effect producing 2 views of the same data.
The problem this causes is that each TextFlow object is now being used by two Containers (I'm using a "TextElementRenderer" as a container class, which takes a TextFlow object and using the TLF draws the text). So it only actually renders in the last one assigned (in my case the thumbnail which lives inside a TileList that lets you switch between editors).
So to avoid this I could just perform a clone/deep copy of the TextFlow, but due to aforementioned approach I need a single TextFlow to exist so that one change update's all, and I'm also editing this via a properties panel (bold/italic etc), which lives elsewhere in the visual hierarchy (I have quite a few types of element apart from text that can be placed on stage and many property panels in this system to cater for them).
So is there a way to allow 2 containers to be used for one TextFlow?
I'm building an application where inside an editor users can lay out and edit text, (using things like resize handles and the EditManager for position and selection/typing). The app has a strict MVC implementation and I'm utilising a global undo system via commands so every edit to the text runs through a central mechanism instead of using the UndoManager directly. I'm also generating thumbnail images of this "container" after a certain time period after user activity, in effect producing 2 views of the same data.
The problem this causes is that each TextFlow object is now being used by two Containers (I'm using a "TextElementRenderer" as a container class, which takes a TextFlow object and using the TLF draws the text). So it only actually renders in the last one assigned (in my case the thumbnail which lives inside a TileList that lets you switch between editors).
So to avoid this I could just perform a clone/deep copy of the TextFlow, but due to aforementioned approach I need a single TextFlow to exist so that one change update's all, and I'm also editing this via a properties panel (bold/italic etc), which lives elsewhere in the visual hierarchy (I have quite a few types of element apart from text that can be placed on stage and many property panels in this system to cater for them).
So is there a way to allow 2 containers to be used for one TextFlow?
