[patch] update, re-done
Index: rowpainter.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v retrieving revision 1.18 diff -u -p -r1.18 rowpainter.C --- rowpainter.C30 May 2003 06:48:20 - 1.18 +++ rowpainter.C3 Jun 2003 15:17:11 - @@ -105,7 +105,12 @@ void RowPainter::paintInset(pos_type con lyx::Assert(inset); #warning inset-update FIXME - inset-update(perv(bv_), false); + //inset-update(perv(bv_), false); + MetricsInfo mi; + mi.base.bv = perv(bv_); + mi.base.font = getFont(pos); + Dimension dim; + inset-metrics(mi, dim); PainterInfo pi(perv(bv_)); pi.base.font = getFont(pos); @@ -291,8 +296,6 @@ void RowPainter::paintFromPos(pos_type } paintForeignMark(orig_x, orig_font); - - return; } Index: text.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v retrieving revision 1.365 diff -u -p -r1.365 text.C --- text.C 28 May 2003 16:36:53 - 1.365 +++ text.C 3 Jun 2003 15:17:12 - @@ -310,7 +310,7 @@ int LyXText::singleWidth(ParagraphList:: // this IS needed otherwise on initialitation we don't get the fill // of the row right (ONLY on initialization if we read a file!) // should be changed! (Jug 20011204) - tmpinset-update(bv()); + //tmpinset-update(bv()); #endif return tmpinset-width(bv(), font); } @@ -1071,7 +1071,7 @@ void LyXText::setHeightOfRow(RowList::it if (tmpinset) { #if 1 // this is needed for deep update on initialitation #warning inset-update FIXME - tmpinset-update(bv()); + //tmpinset-update(bv()); #endif maxwidth += tmpinset-width(bv(), tmpfont); maxasc = max(maxasc, Index: insets/inset.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.h,v retrieving revision 1.99 diff -u -p -r1.99 inset.h --- insets/inset.h 3 Jun 2003 15:10:08 - 1.99 +++ insets/inset.h 3 Jun 2003 15:17:12 - @@ -160,9 +160,6 @@ public: int descent(BufferView *, LyXFont const ) const; /// int width(BufferView *, LyXFont const ) const; - /// update the inset representation - virtual void update(BufferView *, bool = false) - {} /// what appears in the minibuffer when opening virtual string const editMessage() const; /// Index: insets/insetcollapsable.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcollapsable.C,v retrieving revision 1.147 diff -u -p -r1.147 insetcollapsable.C --- insets/insetcollapsable.C 2 Jun 2003 10:03:22 - 1.147 +++ insets/insetcollapsable.C 3 Jun 2003 15:17:12 - @@ -286,23 +286,6 @@ int InsetCollapsable::docbook(Buffer con } -void InsetCollapsable::update(BufferView * bv, bool reinit) -{ - if (in_update) { - if (reinit owner()) { - owner()-update(bv, true); - } - return; - } - in_update = true; - inset.update(bv, reinit); - if (reinit owner()) { - owner()-update(bv, true); - } - in_update = false; -} - - Inset::RESULT InsetCollapsable::localDispatch(FuncRequest const cmd) { //lyxerr InsetCollapsable::localDispatch: cmd.action \n; Index: insets/insetcollapsable.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcollapsable.h,v retrieving revision 1.109 diff -u -p -r1.109 insetcollapsable.h --- insets/insetcollapsable.h 2 Jun 2003 10:03:22 - 1.109 +++ insets/insetcollapsable.h 3 Jun 2003 15:17:12 - @@ -51,8 +51,6 @@ public: /// draw, either inlined (no button) or collapsed/open void draw(PainterInfo pi, int x, int y, bool inlined) const; /// - void update(BufferView *, bool = false); - /// EDITABLE editable() const; /// bool insertInset(BufferView *, Inset * inset); Index: insets/insetert.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetert.C,v retrieving revision 1.129 diff -u -p -r1.129 insetert.C --- insets/insetert.C 3 Jun 2003 15:10:08 - 1.129 +++ insets/insetert.C 3 Jun 2003 15:17:12 - @@ -456,7 +456,7 @@ Inset::RESULT InsetERT::localDispatch(Fu t-need_break_row = t-rows().begin();
Re: [patch] update, re-done
On Tue, Jun 03, 2003 at 05:19:16PM +0200, Andre Poenitz wrote: Index: rowpainter.C My experience mirrors yours: everything works fine, except tabular, which is significantly broken. I suspect that if we somehow force a redo in tabularFeature() somewhere, things will behave better. But the form of this redo ... regards john
Re: [patch] update, re-done
John Levon [EMAIL PROTECTED] writes: | On Tue, Jun 03, 2003 at 05:19:16PM +0200, Andre Poenitz wrote: | | Index: rowpainter.C | | My experience mirrors yours: everything works fine, except tabular, | which is significantly broken. Any idea why it is broken? Can it easily be fixed? I am not so sure that we want to introduce known regressions at this stage. -- Lgb
Re: [patch] update, re-done
On Wed, Jun 04, 2003 at 12:31:17AM +0200, Lars Gullik Bj?nnes wrote: Any idea why it is broken? Not in any concrete sense. Can it easily be fixed? I strongly doubt it. The difficult part is not construction but discovery. But that is just a guess. I am not so sure that we want to introduce known regressions at this stage. I agree. Let's fix undo first. regards john
Re: [patch] update, re-done
On Wed, Jun 04, 2003 at 12:31:17AM +0200, Lars Gullik Bjønnes wrote: John Levon [EMAIL PROTECTED] writes: | On Tue, Jun 03, 2003 at 05:19:16PM +0200, Andre Poenitz wrote: | | Index: rowpainter.C | | My experience mirrors yours: everything works fine, except tabular, | which is significantly broken. Any idea why it is broken? Probably because I copied just a single line out of 47 from InsetTabular::update over to InsetTabular::metrics and some other line in there does something sensible, too. Can it easily be fixed? There is no technical reason why it cannot work. I am not so sure that we want to introduce known regressions at this stage. I'll have a look again later... Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)
[patch] update, re-done
Index: rowpainter.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/rowpainter.C,v retrieving revision 1.18 diff -u -p -r1.18 rowpainter.C --- rowpainter.C30 May 2003 06:48:20 - 1.18 +++ rowpainter.C3 Jun 2003 15:17:11 - @@ -105,7 +105,12 @@ void RowPainter::paintInset(pos_type con lyx::Assert(inset); #warning inset->update FIXME - inset->update(perv(bv_), false); + //inset->update(perv(bv_), false); + MetricsInfo mi; + mi.base.bv = perv(bv_); + mi.base.font = getFont(pos); + Dimension dim; + inset->metrics(mi, dim); PainterInfo pi(perv(bv_)); pi.base.font = getFont(pos); @@ -291,8 +296,6 @@ void RowPainter::paintFromPos(pos_type & } paintForeignMark(orig_x, orig_font); - - return; } Index: text.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v retrieving revision 1.365 diff -u -p -r1.365 text.C --- text.C 28 May 2003 16:36:53 - 1.365 +++ text.C 3 Jun 2003 15:17:12 - @@ -310,7 +310,7 @@ int LyXText::singleWidth(ParagraphList:: // this IS needed otherwise on initialitation we don't get the fill // of the row right (ONLY on initialization if we read a file!) // should be changed! (Jug 20011204) - tmpinset->update(bv()); + //tmpinset->update(bv()); #endif return tmpinset->width(bv(), font); } @@ -1071,7 +1071,7 @@ void LyXText::setHeightOfRow(RowList::it if (tmpinset) { #if 1 // this is needed for deep update on initialitation #warning inset->update FIXME - tmpinset->update(bv()); + //tmpinset->update(bv()); #endif maxwidth += tmpinset->width(bv(), tmpfont); maxasc = max(maxasc, Index: insets/inset.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/inset.h,v retrieving revision 1.99 diff -u -p -r1.99 inset.h --- insets/inset.h 3 Jun 2003 15:10:08 - 1.99 +++ insets/inset.h 3 Jun 2003 15:17:12 - @@ -160,9 +160,6 @@ public: int descent(BufferView *, LyXFont const &) const; /// int width(BufferView *, LyXFont const &) const; - /// update the inset representation - virtual void update(BufferView *, bool = false) - {} /// what appears in the minibuffer when opening virtual string const editMessage() const; /// Index: insets/insetcollapsable.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcollapsable.C,v retrieving revision 1.147 diff -u -p -r1.147 insetcollapsable.C --- insets/insetcollapsable.C 2 Jun 2003 10:03:22 - 1.147 +++ insets/insetcollapsable.C 3 Jun 2003 15:17:12 - @@ -286,23 +286,6 @@ int InsetCollapsable::docbook(Buffer con } -void InsetCollapsable::update(BufferView * bv, bool reinit) -{ - if (in_update) { - if (reinit && owner()) { - owner()->update(bv, true); - } - return; - } - in_update = true; - inset.update(bv, reinit); - if (reinit && owner()) { - owner()->update(bv, true); - } - in_update = false; -} - - Inset::RESULT InsetCollapsable::localDispatch(FuncRequest const & cmd) { //lyxerr << "InsetCollapsable::localDispatch: " << cmd.action << "\n"; Index: insets/insetcollapsable.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcollapsable.h,v retrieving revision 1.109 diff -u -p -r1.109 insetcollapsable.h --- insets/insetcollapsable.h 2 Jun 2003 10:03:22 - 1.109 +++ insets/insetcollapsable.h 3 Jun 2003 15:17:12 - @@ -51,8 +51,6 @@ public: /// draw, either inlined (no button) or collapsed/open void draw(PainterInfo & pi, int x, int y, bool inlined) const; /// - void update(BufferView *, bool = false); - /// EDITABLE editable() const; /// bool insertInset(BufferView *, Inset * inset); Index: insets/insetert.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetert.C,v retrieving revision 1.129 diff -u -p -r1.129 insetert.C --- insets/insetert.C 3 Jun 2003 15:10:08 - 1.129 +++ insets/insetert.C 3 Jun 2003 15:17:12 - @@ -456,7 +456,7 @@ Inset::RESULT InsetERT::localDispatch(Fu t->need_break_row =
Re: [patch] update, re-done
On Tue, Jun 03, 2003 at 05:19:16PM +0200, Andre Poenitz wrote: > Index: rowpainter.C My experience mirrors yours: everything works fine, except tabular, which is significantly broken. I suspect that if we somehow force a "redo" in tabularFeature() somewhere, things will behave better. But the form of this redo ... regards john
Re: [patch] update, re-done
John Levon <[EMAIL PROTECTED]> writes: | On Tue, Jun 03, 2003 at 05:19:16PM +0200, Andre Poenitz wrote: | | > Index: rowpainter.C | | My experience mirrors yours: everything works fine, except tabular, | which is significantly broken. Any idea why it is broken? Can it easily be fixed? I am not so sure that we want to introduce known regressions at this stage. -- Lgb
Re: [patch] update, re-done
On Wed, Jun 04, 2003 at 12:31:17AM +0200, Lars Gullik Bj?nnes wrote: > Any idea why it is broken? Not in any concrete sense. > Can it easily be fixed? I strongly doubt it. The difficult part is not construction but discovery. But that is just a guess. > I am not so sure that we want to introduce known regressions at this > stage. I agree. Let's fix undo first. regards john
Re: [patch] update, re-done
On Wed, Jun 04, 2003 at 12:31:17AM +0200, Lars Gullik Bjønnes wrote: > John Levon <[EMAIL PROTECTED]> writes: > > | On Tue, Jun 03, 2003 at 05:19:16PM +0200, Andre Poenitz wrote: > | > | > Index: rowpainter.C > | > | My experience mirrors yours: everything works fine, except tabular, > | which is significantly broken. > > Any idea why it is broken? Probably because I copied just a single line out of 47 from InsetTabular::update over to InsetTabular::metrics and some other line in there does something sensible, too. > Can it easily be fixed? There is no technical reason why it cannot work. > I am not so sure that we want to introduce known regressions at this > stage. I'll have a look again later... Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)