]> git.lyx.org Git - lyx.git/blobdiff - src/MetricsInfo.cpp
Amend 6c3447c8: FindAdv: sometimes a space is added on some math symbols
[lyx.git] / src / MetricsInfo.cpp
index d663c9a77d29ebaa0431057f016667b02b0ab87e..3fa8973e01279616a70847323f4617cab75149f3 100644 (file)
@@ -152,7 +152,8 @@ int MetricsBase::inPixels(Length const & len) const
 
 MetricsInfo::MetricsInfo(BufferView * bv, FontInfo font, int textwidth,
                          MacroContext const & mc, bool vm, bool tight)
-       : base(bv, font, textwidth), macrocontext(mc), vmode(vm), tight_insets(tight)
+       : base(bv, font, textwidth), macrocontext(mc), vmode(vm), tight_insets(tight),
+         extrawidth(0)
 {}
 
 
@@ -192,9 +193,11 @@ ColorCode PainterInfo::backgroundColor(Inset const * inset, bool sel) const
 
        // special handling for inset background
        if (inset != nullptr) {
-               if (pain.develMode() && !inset->isBufferValid())
+               if (pain.develMode() && !inset->isBufferValid()) {
+                       LYXERR0("Invalid or no buffer set in " << insetName(inset->lyxCode()));
                        // This inset is in error
                        return Color_error;
+               }
 
                ColorCode const color_bg = inset->backgroundColor(*this);
                if (color_bg != Color_none)