mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
Better fix than revision 22553. Transfer the backup to RowPainter::paintInset().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22554 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cb83883583
commit
f643441cf2
@ -1895,15 +1895,10 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y) co
|
||||
// Don't paint the row if a full repaint has not been requested
|
||||
// and if it has not changed.
|
||||
if (!pi.full_repaint && !row_has_changed) {
|
||||
// Backup full_repaint status because some Inset (InsetTabular)
|
||||
// requires a full repaint
|
||||
bool tmp = pi.full_repaint;
|
||||
// Paint only the insets if the text itself is
|
||||
// unchanged.
|
||||
rp.paintOnlyInsets();
|
||||
y += row.descent();
|
||||
// Restore full_repaint status.
|
||||
pi.full_repaint = tmp;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -96,6 +96,10 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos)
|
||||
Font const font = text_metrics_.getDisplayFont(pit_, pos);
|
||||
|
||||
BOOST_ASSERT(inset);
|
||||
// Backup full_repaint status because some insets (InsetTabular)
|
||||
// requires a full repaint
|
||||
bool pi_full_repaint = pi_.full_repaint;
|
||||
|
||||
// FIXME: We should always use font, see documentation of
|
||||
// noFontChange() in Inset.h.
|
||||
pi_.base.font = inset->noFontChange() ?
|
||||
@ -114,6 +118,9 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos)
|
||||
|
||||
x_ += dim.width();
|
||||
|
||||
// Restore full_repaint status.
|
||||
pi_.full_repaint = pi_full_repaint;
|
||||
|
||||
#ifdef DEBUG_METRICS
|
||||
int const x1 = int(x_ - dim.width());
|
||||
Dimension dim2;
|
||||
|
Loading…
Reference in New Issue
Block a user