]> git.lyx.org Git - lyx.git/commitdiff
remove the ->display(false) code in rowBreakPoint
authorJohn Levon <levon@movementarian.org>
Mon, 17 Mar 2003 16:33:49 +0000 (16:33 +0000)
committerJohn Levon <levon@movementarian.org>
Mon, 17 Mar 2003 16:33:49 +0000 (16:33 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6520 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/text.C

index ca18ae6bc9c00fe24645b1502afaaa695646e590..ef380d260d540cfa089400cea46802f03cb1cb8e 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-17  John Levon  <levon@movementarian.org>
+
+       * text.C (rowBreakPoint): remove attempt to fix displayed
+       math insets inside a manual label
+
 2003-03-17  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * lyxtext.h: remove BufferView* as first arg from almost all class
index cb3d88c800fec486d269c0bfa56592a7c0a8c4fd..3831bd50accdefbee6f5dd7d9d3d258bde95a248 100644 (file)
@@ -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