]> git.lyx.org Git - lyx.git/blobdiff - src/TextMetrics.cpp
Fix typo.
[lyx.git] / src / TextMetrics.cpp
index fdf0da692672c78798b2feb956187108df06c0b8..a26b88dc726b0d6a32f9cb5f90fdec712e4783b5 100644 (file)
@@ -402,6 +402,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
        }
 
        // redo insets
+       par.setBeginOfBody();
        Font const bufferfont = buffer.params().getFont();
        CoordCache::Insets & insetCache = bv_->coordCache().insets();
        InsetList::const_iterator ii = par.insetList().begin();
@@ -435,7 +436,6 @@ bool TextMetrics::redoParagraph(pit_type const pit)
                }
        }
 
-       par.setBeginOfBody();
        pos_type first = 0;
        size_t row_index = 0;
        // maximum pixel width of a row
@@ -917,7 +917,7 @@ void TextMetrics::breakRow(Row & row, int const right_margin, pit_type const pit
        // if the row is too large, try to cut at last separator. In case
        // of success, reset indication that the row was broken abruptly.
        if (row.shortenIfNeeded(body_pos, width))
-               row.right_boundary(false);
+               row.right_boundary(!row.empty() && row.back().endpos == row.endpos());
 
        // make sure that the RTL elements are in reverse ordering
        row.reverseRTL(is_rtl);
@@ -1874,7 +1874,6 @@ void TextMetrics::draw(PainterInfo & pi, int x, int y) const
 
 void TextMetrics::drawParagraph(PainterInfo & pi, pit_type const pit, int const x, int y) const
 {
-       BufferParams const & bparams = bv_->buffer().params();
        ParagraphMetrics const & pm = par_metrics_[pit];
        if (pm.rows().empty())
                return;
@@ -1948,7 +1947,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type const pit, int const
 
                // Row signature; has row changed since last paint?
                if (pi.pain.isDrawingEnabled())
-                       row.setCrc(pm.computeRowSignature(row, bparams));
+                       row.setCrc(pm.computeRowSignature(row, *bv_));
                bool row_has_changed = row.changed()
                        || rowSlice == bv_->lastRowSlice();