On Sun, Oct 23, 2016 at 09:09:22PM +0200, Guillaume Munch wrote: > Le 23/10/2016 à 19:55, Richard Heck a écrit : > > On 10/23/2016 01:02 PM, Guillaume Munch wrote: > > > Le 23/10/2016 à 18:38, Enrico Forestieri a écrit : > > > > commit dea5ba16de1b98d93cf30ab65119bc2364a7ac2b > > > > Author: Enrico Forestieri <for...@lyx.org> > > > > Date: Sun Oct 23 18:23:41 2016 +0200 > > > > > > > > Correctly track ulem commands with change tracking > > > > > > > > LyX assumes that everything in \lyxdeleted is struck out by ulem > > > > and increases the corresponding counter. However, deleted display > > > > math material is struck out using tikz. As we also take into > > > > account the deletion of underlined display math (in order to > > > > properly position such material vertically), we have to take > > > > care that the count is correct. > > > > > > > > > This code (this commit and previous related commits) looks fragile to > > > me. Did you not prefer to present a (full and tested) patch on the list > > > and ask other people about it before committing? > > > > Looked pretty straightforward to me. This is a very common use of an > > OutputParams flag. In any event, I take it that this fixed a bug in some of > > the previous work Enrico did on this. It's not usually our policy to > > require > > discussion of that kind of thing. > > > > Where we do always want discussion is with significant changes of behavior, > > and especially of UI-related changes that affect the user experience. If > > I'm > > remembering correctly, there has been some such discussion around how > > deleted displayed math is handled. > > > > Yes, each of the commits looks straightforward. Some of the flags > were already there indeed. And yes, the change in behaviour has been > discussed and is most welcome. > > I meant something else. It seems that "common use of an OutputParams flag" > results in having the logic of a feature scattered all around in tiny bits > of code. I am worried that this is not going to be easy to > maintain. > > When I make small or large changes to the code I always try to give back > something more modular than what I start with. So I wonder whether this > logic could be centralized in some way.
Maybe you should try to understand the code in Paragraph::latex. After I did that, it seemed so straightforward to me to not require further comments. -- Enrico