From 6bcc7d6e42a53979b5c002ea445cf1e32006571e Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 29 May 2018 15:00:04 +0200 Subject: [PATCH] Fixup 4e9084b3e4 The reordering of the code was incorrect. The code calling Change::paintCue() has to come last, since it depends on the change_drawn value. Spotted by coverity. --- src/insets/InsetText.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 78d5ad5e89..0f4619a994 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -232,12 +232,6 @@ void InsetText::draw(PainterInfo & pi, int x, int y) const tm.draw(pi, x + TEXT_TO_INSET_OFFSET, y); } - if (canPaintChange(*pi.base.bv) && (!change_drawn || pi.change_.deleted())) - // Do not draw the change tracking cue if already done by RowPainter and - // do not draw the cue for INSERTED if the information is already in the - // color of the frame - pi.change_.paintCue(pi, xframe, yframe, xframe + w, yframe + h); - if (drawFrame_) { // Change color of the frame in tracked changes, like for tabulars. // Only do so if the color is not custom. But do so even if RowPainter @@ -258,6 +252,12 @@ void InsetText::draw(PainterInfo & pi, int x, int y) const c = frameColor(); pi.pain.rectangle(xframe, yframe, w, h, c); } + + if (canPaintChange(*pi.base.bv) && (!change_drawn || pi.change_.deleted())) + // Do not draw the change tracking cue if already done by RowPainter and + // do not draw the cue for INSERTED if the information is already in the + // color of the frame + pi.change_.paintCue(pi, xframe, yframe, xframe + w, yframe + h); }