X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTextMetrics.cpp;h=739b980dccf6e8f8f4c181363a4f6ea3da72661a;hb=b0a73c0dfdbfa0541f04d7ee2578c4cd272ef7b9;hp=6f195a602245e51790334845c208f4e3b70a05fc;hpb=6df593049c744c48dce7e169fd128a0d859c0253;p=lyx.git diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp index 6f195a6022..739b980dcc 100644 --- a/src/TextMetrics.cpp +++ b/src/TextMetrics.cpp @@ -524,10 +524,11 @@ bool TextMetrics::redoParagraph(pit_type const pit, bool const align_rows) do { if (row_index == pm.rows().size()) pm.rows().push_back(Row()); + else + pm.rows()[row_index] = Row(); Row & row = pm.rows()[row_index]; row.pit(pit); row.pos(first); - row.pit(pit); need_new_row = breakRow(row, right_margin); setRowHeight(row); row.changed(true); @@ -881,6 +882,7 @@ private: */ bool TextMetrics::breakRow(Row & row, int const right_margin) const { + LATTEST(row.empty()); Paragraph const & par = text_->getPar(row.pit()); pos_type const end = par.size(); pos_type const pos = row.pos(); @@ -888,7 +890,6 @@ bool TextMetrics::breakRow(Row & row, int const right_margin) const bool const is_rtl = text_->isRTL(row.pit()); bool need_new_row = false; - row.clear(); row.left_margin = leftMargin(row.pit(), pos); row.right_margin = right_margin; if (is_rtl) @@ -1970,7 +1971,7 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type const pit, int const static int count = 0; ++count; FontInfo fi(sane_font); - fi.setSize(FONT_SIZE_TINY); + fi.setSize(TINY_SIZE); fi.setColor(Color_red); pi.pain.text(row_x, y, convert(count), fi); #endif