// changed.
// Clear background of this row
// (if paragraph background was not cleared)
- if (!pi.full_repaint && row_has_changed)
+ if (!pi.full_repaint && row_has_changed) {
pi.pain.fillRectangle(x, y - rit->ascent(),
width(), rit->height(),
text_->backgroundColor());
+ }
// Instrumentation for testing row cache (see also
// 12 lines lower):
if (lyxerr.debugging(Debug::PAINTING)) {
if (text_->isMainText(bv_->buffer()))
- LYXERR(Debug::PAINTING) << "{" <<
- pi.full_repaint << row_has_changed << "}";
+ LYXERR(Debug::PAINTING) << "\n{" <<
+ pi.full_repaint << row_has_changed << "} ";
else
LYXERR(Debug::PAINTING) << "[" <<
pi.full_repaint << row_has_changed << "]";
}
+
+ // Backup full_repaint status and force full repaint
+ // for inner insets as the Row has been cleared out.
+ bool tmp = pi.full_repaint;
+ pi.full_repaint = true;
rp.paintAppendix();
rp.paintDepthBar();
rp.paintChangeBar();
if (rit + 1 == re)
rp.paintLast();
y += rit->descent();
+ // Restore full_repaint status.
+ pi.full_repaint = tmp;
}
// Re-enable screen drawing for future use of the painter.
pi.pain.setDrawingEnabled(true);
openinlined_ = !hasFixedWidth()
&& textdim_.wid < 0.5 * mi.base.bv->workWidth();
if (openinlined_) {
- // FIXME: this is not ideal but we need to clear it
- // out because the Row::changed() status is reset.
- mi.base.bv->textMetrics(&text_).clear();
- // Correct for button width, and re-fit
- mi.base.textwidth -= dim.wid;
- InsetText::metrics(mi, textdim_);
- mi.base.textwidth += dim.wid;
+ // Correct for button width.
dim.wid += textdim_.wid;
dim.des = max(dim.des - textdim_.asc + dim.asc, textdim_.des);
dim.asc = textdim_.asc;
s, font, Color::none, Color::none);
}
- // a visual cue when the cursor is inside the inset
+ // a visual clue when the cursor is inside the inset
Cursor & cur = pi.base.bv->cursor();
if (cur.isInside(this)) {
y -= ascent();