]> git.lyx.org Git - lyx.git/commitdiff
When a row is shortened, reset its flushed() attribute.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 31 Aug 2017 12:52:30 +0000 (14:52 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 3 Sep 2017 16:34:01 +0000 (18:34 +0200)
Fixes bug #10699.

(cherry picked from commit 59e2c40564f441044d38f2082b8a038cc093c932)

src/TextMetrics.cpp
status.22x

index f61db67f7282edf824388c70eaea3d1d5782bca3..e5a7d5ca0f25a3f0b5a7d36e8717d91a759c1cd8 100644 (file)
@@ -947,7 +947,8 @@ void TextMetrics::breakRow(Row & row, int const right_margin, pit_type const pit
        int const next_width = max_width_ - leftMargin(max_width_, pit, row.endpos())
                - rightMargin(pit);
 
-       row.shortenIfNeeded(body_pos, width, next_width);
+       if (row.shortenIfNeeded(body_pos, width, next_width))
+               row.flushed(false);
        row.right_boundary(!row.empty() && row.endpos() < end
                           && row.back().endpos == row.endpos());
        // Last row in paragraph is flushed
index 1e2710f1b7086509b664ea7c2390d3f681a30632..e5ee17023538fad552bd42f84a87a70ed487c3ee 100644 (file)
@@ -103,6 +103,8 @@ What's new
 
 - Fix some rare cases of bad on-screen line breaking (bug #10700).
 
+- Fix bad justification before a displayed inset (bug 10699).
+
 - Fix cursor state after double/triple click in mathed (bug #10686).
 
 - Avoid a case of stuck cursor after entering an inset (bug 10630).