]> git.lyx.org Git - features.git/commitdiff
Reset the (running) change in PainterInfo
authorVincent van Ravesteijn <vfr@lyx.org>
Sun, 29 Apr 2012 11:44:58 +0000 (13:44 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Sun, 29 Apr 2012 15:00:12 +0000 (17:00 +0200)
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).

(cherry picked from commit af4e31ec28c71815ca07bebd6e5c3893535f4bf8)

src/rowpainter.cpp
status.20x

index bcbf6da6fbbb2c4500c90f351b2a01d7dc2025cd..fb14008434b536fd0e3bc9136611de4a8849ec45 100644 (file)
@@ -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;
index fa19bc7b92920e2340b4b68564de53d1e7c8d4f3..fde5f3295027ee3a5603c025b14c3d5119d53a9c 100644 (file)
@@ -157,6 +157,9 @@ What's new
 
 - Fix erroneous error message when calling "buffer-language" manually.
 
+- Fix coloring of insets that come after deleted text insets with
+  change tracking on.
+
 
 * DOCUMENTATION AND LOCALIZATION