From: André Pönitz Date: Thu, 7 Aug 2003 10:00:33 +0000 (+0000) Subject: fix "height grows when moving in tables" bug X-Git-Tag: 1.6.10~16318 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2a875922864c2af185bfdc3c57fdae529347c2de;p=lyx.git fix "height grows when moving in tables" bug git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7516 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/text2.C b/src/text2.C index 2cd1c61f69..b5853d75f5 100644 --- a/src/text2.C +++ b/src/text2.C @@ -81,7 +81,8 @@ void LyXText::init(BufferView * bview) bv_owner = bview; rowlist_.clear(); - width = height = 0; + width = 0; + height = 0; anchor_row_ = rows().end(); anchor_row_offset_ = 0; @@ -641,7 +642,6 @@ void LyXText::redoParagraph(ParagraphList::iterator pit) // insert a new row, starting at position 0 Row newrow(pit, 0); rit = rowlist_.insert(rit, newrow); - //newrow.dump("newrow: "); // and now append the whole paragraph before the new row pos_type const last = rit->par()->size(); @@ -651,12 +651,10 @@ void LyXText::redoParagraph(ParagraphList::iterator pit) pos_type z = rowBreakPoint(*rit); RowList::iterator tmprow = rit; - //tmprow->dump("tmprow: "); if (z < last) { ++z; Row newrow(rit->par(), z); - //newrow.dump("newrow2: "); rit = rowlist_.insert(boost::next(rit), newrow); } else { done = true; @@ -665,12 +663,8 @@ void LyXText::redoParagraph(ParagraphList::iterator pit) // Set the dimensions of the row // fixed fill setting now by calling inset->update() in // SingleWidth when needed! - //tmprow->dump("tmprow 1: "); tmprow->fill(fill(tmprow, workWidth())); - //tmprow->dump("tmprow 2: "); setHeightOfRow(tmprow); - //tmprow->dump("tmprow 3: "); - height += rit->height(); } while (!done); @@ -680,7 +674,6 @@ void LyXText::redoParagraph(ParagraphList::iterator pit) void LyXText::fullRebreak() { - lyxerr << "fullRebreak" << endl; redoParagraphs(ownerParagraphs().begin(), ownerParagraphs().end()); setCursorIntern(cursor.par(), cursor.pos()); selection.cursor = cursor; @@ -694,7 +687,8 @@ void LyXText::metrics(MetricsInfo & mi, Dimension & dim) // rebuild row cache rowlist_.clear(); - width = height = 0; + width = 0; + height = 0; anchor_row_ = rows().end(); anchor_row_offset_ = 0;