From 3e69f1b800537020c8b7b3897115d6e7ce483dc0 Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 17 Mar 2003 16:33:49 +0000 Subject: [PATCH] remove the ->display(false) code in rowBreakPoint git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6520 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/text.C | 20 ++++---------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ca18ae6bc9..ef380d260d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-03-17 John Levon + + * text.C (rowBreakPoint): remove attempt to fix displayed + math insets inside a manual label + 2003-03-17 Lars Gullik Bjønnes * lyxtext.h: remove BufferView* as first arg from almost all class diff --git a/src/text.C b/src/text.C index cb3d88c800..3831bd50ac 100644 --- a/src/text.C +++ b/src/text.C @@ -710,12 +710,8 @@ namespace { pos_type addressBreakPoint(pos_type i, Paragraph * par) { for (; i < par->size(); ++i) { - if (par->isNewline(i)) { + if (par->isNewline(i)) return i; - } else if (par->isInset(i) && par->getInset(i)->display()) { - // FIXME: what are we doing modifying stuff here ! - par->getInset(i)->display(false); - } } return par->size(); @@ -787,22 +783,14 @@ LyXText::rowBreakPoint(Row const & row) const chunkwidth += thiswidth; Inset * in = par->isInset(i) ? par->getInset(i) : 0; - bool display = (in && (in->display() || in->needFullRow())); - - // check whether a Display() inset is valid here. - // If not, change it to non-display. FIXME: - // we should not be modifying things at this - // point ! - if (in && in->display() && (layout->isCommand() || - (layout->labeltype == LABEL_MANUAL && i < body_pos))) - in->display(false); + bool fullrow = (in && (in->display() || in->needFullRow())); // break before a character that will fall off // the right of the row if (x >= width) { // if no break before or we are at an inset // that will take up a row, break here - if (point == last || display || chunkwidth >= (width - left)) { + if (point == last || fullrow || chunkwidth >= (width - left)) { if (pos < i) point = i - 1; else @@ -820,7 +808,7 @@ LyXText::rowBreakPoint(Row const & row) const continue; } - if (!display) + if (!fullrow) continue; // full row insets start at a new row -- 2.39.2