]> git.lyx.org Git - features.git/commitdiff
Fix width of row when there are active hfills
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 30 Nov 2015 21:00:48 +0000 (22:00 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 1 Dec 2015 08:14:22 +0000 (09:14 +0100)
It is important to make sure in computeRowMetrics that the row width
is correct at the end, because we rely on it in several places.

Fixes bug #9870.

src/TextMetrics.cpp

index ee101b39877164431d6544c4275c831bc5fcf370..889634adf5ec3c848bb75eb1a47bf7f6a54a2e2f 100644 (file)
@@ -596,6 +596,7 @@ void TextMetrics::computeRowMetrics(pit_type const pit,
        if (nh > 0) {
                hfill = w / nh;
                hfill_rem = w % nh;
+               row.dimension().wid += w;
        } else if (nh == 0 && int(row.width()) < max_width_) {
                // is it block, flushleft or flushright?
                // set x how you need it