X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Frowpainter.C;h=fdb3450e6407679b09c51d90fc9ce9b2853d8b10;hb=35204f8f33d7400a5fefeffea533fb4cb4097211;hp=a2936fe8d96be1500a54897165c960be6663a723;hpb=c52014f2ff64c918c6bb57f7e5d90d844c52d932;p=lyx.git diff --git a/src/rowpainter.C b/src/rowpainter.C index a2936fe8d9..fdb3450e64 100644 --- a/src/rowpainter.C +++ b/src/rowpainter.C @@ -180,9 +180,11 @@ void RowPainter::paintInset(pos_type const pos, LyXFont const & font) InsetText const * const in = inset->asTextInset(); // non-wide insets are painted completely. Recursive bool tmp = refreshInside; - if (!in || !in->Wide()) { + if (!in || !in->wide()) { refreshInside = true; - lyxerr[Debug::PAINTING] << endl << "Paint inset fully" << endl; + if (lyxerr.debugging(Debug::PAINTING)) { + lyxerr << endl << "Paint inset fully" << endl; + } } if (refreshInside) inset->drawSelection(pi, int(x_), yo_); @@ -880,12 +882,17 @@ void paintPar text); // If this is the only object on the row, we can make it wide + // + // FIXME: there is a const_cast here because paintPar() is not supposed + // to touch the paragraph contents. So either we move this "wide" + // property out of InsetText or we localize the feature to the painting + // done here. for (pos_type i = rit->pos() ; i != rit->endpos(); ++i) { InsetBase const * const in = par.getInset(i); if (in) { - InsetText const * const t = in->asTextInset(); + InsetText * t = const_cast(in->asTextInset()); if (t) - t->Wide() = in_inset_alone_on_row; + t->setWide(in_inset_alone_on_row); } } @@ -916,12 +923,14 @@ void paintPar // Instrumentation for testing row cache (see also // 12 lines lower): - if (text.isMainText(*pi.base.bv->buffer())) - lyxerr[Debug::PAINTING] << "#"; - else - lyxerr[Debug::PAINTING] << "[" << - repaintAll << row_has_changed << - cursor_on_row << "]"; + if (lyxerr.debugging(Debug::PAINTING)) { + if (text.isMainText(*pi.base.bv->buffer())) + lyxerr[Debug::PAINTING] << "#"; + else + lyxerr[Debug::PAINTING] << "[" << + repaintAll << row_has_changed << + cursor_on_row << "]"; + } rp.paintAppendix(); rp.paintDepthBar(); rp.paintChangeBar(); @@ -938,7 +947,9 @@ void paintPar // Re-enable screen drawing for future use of the painter. pi.pain.setDrawingEnabled(true); - lyxerr[Debug::PAINTING] << "." << endl; + if (lyxerr.debugging(Debug::PAINTING)) { + lyxerr[Debug::PAINTING] << "." << endl; + } } } // namespace anon