From: Jürgen Vigna Date: Fri, 10 Aug 2001 10:24:44 +0000 (+0000) Subject: Some more of optimizations. X-Git-Tag: 1.6.10~20869 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7a058f4f0389d4cac1fb0a9c47f8157a6f66e054;p=features.git Some more of optimizations. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2476 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 10e55362bd..c58742ac98 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,7 +1,12 @@ 2001-08-10 Juergen Vigna + * 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 diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index 2a4cca3120..d0ee23b7c1 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -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)); diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 18f1f15fe0..b9eee979ee 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -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; } }