]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettabular.C
The speed patch: redraw only rows that have changed
[lyx.git] / src / insets / insettabular.C
index 630502a1472432caeb27889327efffd2d8ee067d..4d7b3085fe6b5ad303d303f2b39538607a103222 100644 (file)
@@ -1422,10 +1422,7 @@ void InsetTabular::tabularFeatures(LCursor & cur,
 
        case LyXTabular::SET_PWIDTH: {
                LyXLength const len(value);
-               tabular.setColumnPWidth(cur.idx(), len);
-               // cur position can become invalid after newlines were removed
-               if (cur.pos() > cur.lastpos())
-                       cur.pos() = cur.lastpos();
+               tabular.setColumnPWidth(cur, cur.idx(), len);
                if (len.zero()
                    && tabular.getAlignment(cur.idx(), true) == LYX_ALIGN_BLOCK)
                        tabularFeatures(cur, LyXTabular::ALIGN_CENTER, string());
@@ -1433,10 +1430,7 @@ void InsetTabular::tabularFeatures(LCursor & cur,
        }
 
        case LyXTabular::SET_MPWIDTH:
-               tabular.setMColumnPWidth(cur.idx(), LyXLength(value));
-               // cur position can become invalid after newlines were removed
-               if (cur.pos() > cur.lastpos())
-                       cur.pos() = cur.lastpos();
+               tabular.setMColumnPWidth(cur, cur.idx(), LyXLength(value));
                break;
 
        case LyXTabular::SET_SPECIAL_COLUMN: