On Sat, Apr 12, 2025 at 11:42:21AM -0400, Richard Kimberly Heck wrote:
> On 4/12/25 7:32 AM, Scott Kostyshak wrote:
> > On Sat, Apr 12, 2025 at 11:25:43AM +0000, Scott Kostyshak wrote:
> > > commit 7660d14875c9d8b8b83f134c5ac8ffbe12f846cc
> > > Author: Scott Kostyshak <skost...@lyx.org>
> > > Date:   Sat Apr 12 13:20:18 2025 +0200
> > > 
> > >      Comments
> > > ---
> > >   src/insets/InsetBibtex.cpp | 2 ++
> > >   1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp
> > > index a6482d9315..e96f9d4d9d 100644
> > > --- a/src/insets/InsetBibtex.cpp
> > > +++ b/src/insets/InsetBibtex.cpp
> > > @@ -178,6 +178,7 @@ docstring InsetBibtex::screenLabel() const
> > >   {
> > >           docstring res;
> > >           if (getParam("bibfiles").empty())
> > > +         // additionally, in updateBuffer(), we setBroken() in this case.
> > >                   res = _("EMPTY: ");
> > >           res += usingBiblatex() ? _("Biblatex Generated Bibliography")
> > >                                  : _("BibTeX Generated Bibliography");
> > > @@ -939,6 +940,7 @@ void InsetBibtex::updateBuffer(ParIterator const &, 
> > > UpdateType, bool const /*del
> > >           if (invalidate)
> > >                   buffer().invalidateBibinfoCache();
> > > + // additionally, in screenLabel(), we prepend string "EMPTY".
> > >           setBroken(getParam("bibfiles").empty());
> > >   }
> > 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.
> 
> JMarc will know better than I, but my sense is that they are called at very
> different times, though of course these two things should always be in sync.

JMarc, any thoughts?

Scott

Attachment: signature.asc
Description: PGP signature

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

Reply via email to