Le 30/03/2015 22:42, Georg Baum a écrit :
Meanwhile I do have a better understanding of the math macros and found
another solution which I think is much better. First, it is really very
difficult to get rid of ArgumentProxy::mathMacro_. So, I stopped trying to
get rid of it but rather tried to find out how to keep it up to date in an
idiot proof way (because everything else will break in the future, BTDT),
and I believe I found one:
All ArgumentProxy instances are contained in MathMacro::expanded_, which
means that there is always a unique parent-child like relationship between
MathMacro and ArgumentProxy.
[snip very interesting description]
Could you tell us a little bit about ArgumentProxy and what is is good for?
BTW updateMacros is quite heavy on big documents (#5973) and I have
medium-term plans for making the update lazy. This may become
unnecessary if you can do another kind of miracle. My plan is to use
recordUndo to increment a version_id for the buffer. Therefore we can
know when macros really need to be updated.
JMarc