Richard Heck wrote:
The pointer in question is a boost::shared_ptr. This is needed because CutAndPaste saves a copy of the layout with each cut or copied selection. We cannot assume the selection vanishes when the document is closed, so there are two options: (i) keep a list of all the layouts that have ever been used by any document; (ii) used some kind of smart pointer. The latter seems preferable, as the former would waste memory.
(iii) remember layout base class _and_ module in BufferParams. Maybe the solution is to have a global TextClassModule along the global TextClassList instead of having local copies of TextClass? Or integrate the module access to the TextClassList itself?
Abdel.