]> git.lyx.org Git - lyx.git/commitdiff
Little bit more debug info for unset Buffer members.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 18 Apr 2024 20:03:14 +0000 (16:03 -0400)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 18 Apr 2024 22:25:47 +0000 (18:25 -0400)
src/MetricsInfo.cpp
src/mathed/MathRow.cpp

index 844c1c13f392ca51ab5fc5306453f95dd09e2313..3fa8973e01279616a70847323f4617cab75149f3 100644 (file)
@@ -193,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)
index 7b5ff9e1d0075f21dae0d0705bdb8d8cad023d5d..b8d8f63d8ec915805078ab2805840fc805d7c3ba 100644 (file)
@@ -337,9 +337,11 @@ void MathRow::draw(PainterInfo & pi, int x, int const y) const
                        // while it is drawing, because it relies on this value.
                        Geometry & g = coords.insets().geometry(e.inset);
                        g.dim.wid -= e.before + e.after;
-                       if (pi.pain.develMode() && !e.inset->isBufferValid())
+                       if (pi.pain.develMode() && !e.inset->isBufferValid()) {
                                pi.pain.fillRectangle(x + e.before, y - g.dim.ascent(),
                                                      g.dim.width(), g.dim.height(), Color_error);
+                               LYXERR0("Unset Buffer memeber in " << insetName(e.inset->lyxCode()));
+                       }
                        e.inset->draw(pi, x + e.before, y);
                        g.pos = {x, y};
                        g.dim.wid += e.before + e.after;