[LyX/master] Revert "Improve structure of updateMacros"
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Wed Nov 11 18:22:11 UTC 2020
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.
JMarc
More information about the lyx-devel
mailing list