]> git.lyx.org Git - features.git/commitdiff
Always repaint the gray area below main inset
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 16 Apr 2024 21:55:24 +0000 (23:55 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 17 Apr 2024 21:23:19 +0000 (23:23 +0200)
Now that SingleParUpdate does not always lead to a full screen update
when the height of the paragraph changes (see new behavior of
updateMatrics(bool)), it is necessary to make sure that the grey area
below the main page is always repainted.

(cherry picked from commit 1a11abe4394272f521cd63993e426c136e0e9b6c)

src/BufferView.cpp

index 1056459ea204dfe7760d3bc9e4e21fe0c74410df..e1527b6548e01f850c0a207e2c6b75b8a4af1d4f 100644 (file)
@@ -3656,7 +3656,11 @@ void BufferView::draw(frontend::Painter & pain, bool paint_caret)
                // Draw everything.
                tm.draw(pi, 0, y);
 
-               // and possibly grey out below
+               break;
+       }
+
+       // Possibly grey out below
+       if (d->update_strategy_ != NoScreenUpdate) {
                pair<pit_type, ParagraphMetrics const *> lastpm = tm.last();
                int const y2 = lastpm.second->bottom();
 
@@ -3665,8 +3669,8 @@ void BufferView::draw(frontend::Painter & pain, bool paint_caret)
                                ? Color_background : Color_bottomarea;
                        pain.fillRectangle(0, y2, width_, height_ - y2, color);
                }
-               break;
        }
+
        LYXERR(Debug::PAINTING, (pain.isNull() ? "\t\t --- END NODRAW ---"
                                : "\t\t *** END DRAWING ***"));