]> git.lyx.org Git - features.git/commitdiff
Some more of optimizations.
authorJürgen Vigna <jug@sad.it>
Fri, 10 Aug 2001 10:24:44 +0000 (10:24 +0000)
committerJürgen Vigna <jug@sad.it>
Fri, 10 Aug 2001 10:24:44 +0000 (10:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2476 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insettabular.C
src/insets/insettext.C

index 10e55362bdb9e7034ce16d746ec3ebfa7aa9d32f..c58742ac984daa33e85e9e6442a04ceac11ab5ae 100644 (file)
@@ -1,7 +1,12 @@
 2001-08-10  Juergen Vigna  <jug@sad.it>
 
+       * insettabular.C (calculate_dimensions_of_cells): let's try to call
+       update only for fixed with cells.
+
        * insettext.C (update): comment this out as it seems first wrong
        and second not needed anymore!
+       (some functions): call reinitLyXText() only in update() in all other
+       positions set only need_update = INIT.
 
 2001-08-08  Juergen Vigna  <jug@sad.it>
 
index 2a4cca31209118e9ffd9b1246c1a15aba7dc4d43..d0ee23b7c156eee2b5463a8510ee31c7920e31ce 100644 (file)
@@ -1196,7 +1196,7 @@ bool InsetTabular::calculate_dimensions_of_cells(BufferView * bv,
                                continue;
                        ++cell;
                        inset = tabular->GetCellInset(cell);
-                       if (!reinit)
+                       if (!reinit && !tabular->GetPWidth(cell).empty())
                                inset->update(bv, font, false);
                        maxAsc = max(maxAsc, inset->ascent(bv, font));
                        maxDesc = max(maxDesc, inset->descent(bv, font));
index 18f1f15fe0b2824311190c07f3541617221927ef..b9eee979eefa2d8b4851613cd7bcd6775b168e42 100644 (file)
@@ -202,7 +202,7 @@ void InsetText::clear()
                par = tmp;
        }
        par = new Paragraph;
-       reinitLyXText(true);
+       need_update = INIT;
 }
 
 
@@ -522,7 +522,7 @@ void InsetText::update(BufferView * bv, LyXFont const & font, bool reinit)
        }
        in_update = true;
        if (reinit || need_update == INIT) {
-               need_update |= FULL;
+               need_update = FULL;
                reinitLyXText();
                if (owner())
                        owner()->update(bv, font, true);
@@ -1741,7 +1741,7 @@ void InsetText::setParagraphData(Paragraph * p)
                np = np->next();
                np->setInsetOwner(this);
        }
-       reinitLyXText(true);
+       need_update = INIT;
 }
 
 
@@ -1758,10 +1758,9 @@ void InsetText::setAutoBreakRows(bool flag)
 {
        if (flag != autoBreakRows) {
                autoBreakRows = flag;
-               need_update = FULL;
                if (!flag)
                        removeNewlines();
-               reinitLyXText(true);
+               need_update = INIT;
        }
 }