]> git.lyx.org Git - features.git/commitdiff
Fixup a700d657 : holes in right margin selection
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 25 Oct 2016 14:14:35 +0000 (16:14 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 25 Oct 2016 14:17:21 +0000 (16:17 +0200)
src/RowPainter.cpp

index 0d92136bd21290f151af97c4fd5299f27c266f3a..8a92d3e785085770487d223e89c46a8ab0b3f686 100644 (file)
@@ -617,11 +617,6 @@ void RowPainter::paintSelection() const
        if ((row_.begin_margin_sel && !rtl) || (row_.end_margin_sel && rtl))
                pi_.pain.fillRectangle(int(xo_), y1, row_.left_margin, y2 - y1,
                                       Color_selection);
-       if ((row_.begin_margin_sel && rtl) || (row_.end_margin_sel && !rtl))
-               pi_.pain.fillRectangle(int(xo_ + row_.width()), y1,
-                                      text_metrics_.width() - row_.width(), y2 - y1,
-                                      Color_selection);
-
        // go through row and draw from RTL boundary to RTL boundary
        int x = xo_ + row_.left_margin;
        for (auto const & e : row_) {
@@ -647,6 +642,11 @@ void RowPainter::paintSelection() const
                }
                x += e.full_width();
        }
+
+       if ((row_.begin_margin_sel && rtl) || (row_.end_margin_sel && !rtl))
+               pi_.pain.fillRectangle(x, y1, int(xo_) + text_metrics_.width() - x, y2 - y1,
+                                      Color_selection);
+
 }