From af4e31ec28c71815ca07bebd6e5c3893535f4bf8 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sun, 29 Apr 2012 13:44:58 +0200 Subject: [PATCH] Reset the (running) change in PainterInfo When an InsetText is deleted, all lines in the inset are painted as deleted. This status should be restored afterwards. If not, insets will be painted in the wrong color afterwards (e.g. tables). --- src/rowpainter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index c5cc772fe8..a9f8352df0 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -128,6 +128,7 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos) pi_.base.font = inset->inheritFont() ? font.fontInfo() : pi_.base.bv->buffer().params().getFont().fontInfo(); pi_.ltr_pos = (bidi_.level(pos) % 2 == 0); + Change prev_change = change_; pi_.change_ = change_.changed() ? change_ : par_.lookupChange(pos); int const x1 = int(x_); @@ -147,6 +148,7 @@ void RowPainter::paintInset(Inset const * inset, pos_type const pos) // Restore full_repaint status. pi_.full_repaint = pi_full_repaint; + pi_.change_ = prev_change; #ifdef DEBUG_METRICS int const x2 = x1 + dim.wid; -- 2.39.2