mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Little bit more debug info for unset Buffer members.
This commit is contained in:
parent
9bd5d0b251
commit
7c140f743d
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user