[LyX/master] Revert "Improve structure of updateMacros"
Richard Kimberly Heck
rikiheck at lyx.org
Thu Nov 12 14:29:28 UTC 2020
On 11/11/20 1:22 PM, Jean-Marc Lasgouttes wrote:
> Le 11/11/2020 à 19:16, Richard Kimberly Heck a écrit :
>>> I really think that we should reduce our use of codes as much as
>>> possible. Isn't it possible to use a virtual method here that would
>>> be implemented by each inset? t is bad to have the knowledge about
>>> the insets scattered around the code.
>>
>> The existing code uses some virtual methods. There are probably other
>> places we could do that.
>>
>> What else do you have in mind?
>
> Just call inset->updateMacros(...) and let the inset do the right
> thing. These long lists of if() are not good.
>
> I might not be possible in this particular case, I did not read the code.
I think this is doable. It might also allow us to run updateMacros only
on a single paragraph, once it's complete. The big data structures only
get invalidated for within the paragraph. That would make a big
difference. Better would be to figure out some simpler set of data
structures, but I'm not seeing that yet.
Riki
More information about the lyx-devel
mailing list