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).

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.

Conclusion: the code is fine as it is, IMO.

JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to