On Thu, Apr 17, 2025 at 12:06:45AM +0200, Jean-Marc Lasgouttes wrote: > Le 12/04/2025 à 13:32, Scott Kostyshak a écrit : > > Can I move the setBroken() to inside screenLabel(), as in the attached > > patch? > > > > When looking at this code (for a different purpose), I was confused that > > "EMPTY" is prepended in one part, and the inset is colored red in > > a different part. > > > > On the other hand, I do not know if it is an abuse of screenLabel(), > > which perhaps should be reserved strictly for setting the text of the > > label. > > I would say that you should not: computing a screen label should not change > the inset (by setting its broken flag).
Thanks for taking a look. Makes sense. > OTOH, you could maybe use isBroken() in screenLabel(), but it is strange > then to prepend EMPTY to the label, because this means that you know why it > is broken. This part I don't understand. Why is it strange to know why it is broken? To me the "isBroken()" is useful to draw the user attention to the issue by marking it as red. And the "EMPTY" prefix explains what is wrong. The reason I'm looking at this code is I am working on a patch to mark it as broken if one of the .bib files is not found. > Conclusion: the code is fine as it is, IMO. Sounds good. Scott
signature.asc
Description: PGP signature
-- lyx-devel mailing list lyx-devel@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-devel