]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Russian splash.lyx: updates from Yuriy
[lyx.git] / src / TextMetrics.cpp
index f94accae67176f898c3fcce7f63ab485638f5909..6c5a3222772cf794f6bc31fa27327477e951f3cc 100644 (file)
@@ -640,8 +640,10 @@ void TextMetrics::computeRowMetrics(Row & row, int width) const
                        break;
                case LYX_ALIGN_LEFT:
                        // a displayed inset that is flushed
-                       if (Inset const * inset = par.getInset(row.pos()))
+                       if (Inset const * inset = par.getInset(row.pos())) {
                                row.left_margin += inset->indent(*bv_);
+                               row.dimension().wid += inset->indent(*bv_);
+                       }
                        break;
                case LYX_ALIGN_RIGHT:
                        if (Inset const * inset = par.getInset(row.pos())) {
@@ -966,7 +968,8 @@ bool TextMetrics::breakRow(Row & row, int const right_margin) const
        int const next_width = max_width_ - leftMargin(row.pit(), row.endpos())
                - rightMargin(row.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