]> git.lyx.org Git - features.git/commitdiff
Round values properly when drawing right margin selection
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 4 Nov 2016 14:57:59 +0000 (15:57 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 4 Nov 2016 15:00:55 +0000 (16:00 +0100)
This fixes a compiler warning reported by Uwe.
(cherry picked from commit 75fce32556d2ec3da37acf96e4bafd23b5e5609a)

src/RowPainter.cpp

index ac3e82301301ec33f59206d386b002d814395527..17f148ed680457d3c8aac1abeb306cfec2ba162b 100644 (file)
@@ -694,7 +694,8 @@ void RowPainter::paintSelection() const
        }
 
        if (rtl ? row_.begin_margin_sel : row_.end_margin_sel)
-               pi_.pain.fillRectangle(x, y1, int(xo_) + text_metrics_.width() - x, y2 - y1,
+               pi_.pain.fillRectangle(int(x), y1,
+                                      int(xo_ + text_metrics_.width()) - int(x), y2 - y1,
                                       Color_selection);
 
 }