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.C        30 May 2003 06:48:20 -0000      1.18
+++ rowpainter.C        3 Jun 2003 07:03:47 -0000
@@ -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 -0000      1.365
+++ text.C      3 Jun 2003 07:03:47 -0000
@@ -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.98
diff -u -p -r1.98 inset.h
--- insets/inset.h      2 Jun 2003 16:14:33 -0000       1.98
+++ insets/inset.h      3 Jun 2003 07:03:47 -0000
@@ -161,8 +161,8 @@ public:
        ///
        int width(BufferView *, LyXFont const &) const;
        /// update the inset representation
-       virtual void update(BufferView *, bool = false)
-               {}
+       //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 -0000       1.147
+++ insets/insetcollapsable.C   3 Jun 2003 07:03:47 -0000
@@ -285,7 +285,7 @@ int InsetCollapsable::docbook(Buffer con
        return inset.docbook(buf, os, mixcont);
 }
 
-
+/*
 void InsetCollapsable::update(BufferView * bv, bool reinit)
 {
        if (in_update) {
@@ -301,6 +301,7 @@ void InsetCollapsable::update(BufferView
        }
        in_update = false;
 }
+*/
 
 
 Inset::RESULT InsetCollapsable::localDispatch(FuncRequest const & cmd)
Index: insets/insetert.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetert.C,v
retrieving revision 1.128
diff -u -p -r1.128 insetert.C
--- insets/insetert.C   2 Jun 2003 10:03:22 -0000       1.128
+++ insets/insetert.C   3 Jun 2003 07:03:47 -0000
@@ -456,7 +456,7 @@ Inset::RESULT InsetERT::localDispatch(Fu
                t->need_break_row = t->rows().begin();
                t->fullRebreak();
                t->setCursorIntern(t->cursor.par(), t->cursor.pos());
-               inset.update(cmd.view(), true);
+               //inset.update(cmd.view(), true);
                bv->updateInset(this);
                result = DISPATCHED;
        }
@@ -674,7 +674,7 @@ void InsetERT::update(BufferView * bv, b
                setButtonLabel();
        }
 
-       InsetCollapsable::update(bv, reinit);
+       //InsetCollapsable::update(bv, reinit);
 }
 
 
Index: insets/insetinclude.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetinclude.C,v
retrieving revision 1.120
diff -u -p -r1.120 insetinclude.C
--- insets/insetinclude.C       2 Jun 2003 10:03:22 -0000       1.120
+++ insets/insetinclude.C       3 Jun 2003 07:03:47 -0000
@@ -536,14 +536,7 @@ void InsetInclude::draw(PainterInfo & pi
        if (!preview_->monitoring())
                preview_->startMonitoring();
 
-       Dimension dim;
-       MetricsInfo mi;
-       mi.base.bv = pi.base.bv;
-       mi.base.font = pi.base.font;
-       metrics(mi, dim);
-       dim_ = dim;
-
-       pi.pain.image(x, y - dim.asc, dim.wid, dim.height(),
+       pi.pain.image(x, y - dim_.asc, dim_.wid, dim_.height(),
                            *(preview_->pimage()->image()));
 }
 
Index: insets/insetminipage.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetminipage.C,v
retrieving revision 1.76
diff -u -p -r1.76 insetminipage.C
--- insets/insetminipage.C      2 Jun 2003 10:03:22 -0000       1.76
+++ insets/insetminipage.C      3 Jun 2003 07:03:47 -0000
@@ -121,7 +121,7 @@ dispatch_result InsetMinipage::localDisp
                LyXText * t = inset.getLyXText(cmd.view());
                t->need_break_row = t->rows().begin();
                t->fullRebreak();
-               inset.update(cmd.view(), true);
+               //inset.update(cmd.view(), true);
                t->setCursorIntern(t->cursor.par(), t->cursor.pos());
                cmd.view()->updateInset(this);
                return DISPATCHED;
Index: insets/insettabular.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v
retrieving revision 1.284
diff -u -p -r1.284 insettabular.C
--- insets/insettabular.C       2 Jun 2003 16:40:38 -0000       1.284
+++ insets/insettabular.C       3 Jun 2003 07:03:47 -0000
@@ -243,9 +243,9 @@ void InsetTabular::read(Buffer const * b
 }
 
 
-void InsetTabular::metrics(MetricsInfo &,
-       Dimension & dim) const
+void InsetTabular::metrics(MetricsInfo & mi, Dimension & dim) const
 {
+       calculate_dimensions_of_cells(mi.base.bv, true);
        dim.asc = tabular->GetAscentOfRow(0);
        dim.des = tabular->GetHeightOfTabular() - tabular->GetAscentOfRow(0) + 1;
        dim.wid = tabular->GetWidthOfTabular() + 2 * ADD_TO_TABULAR_WIDTH;
@@ -382,7 +382,7 @@ void InsetTabular::drawCellSelection(Pai
        }
 }
 
-
+/*
 void InsetTabular::update(BufferView * bv, bool reinit)
 {
        if (in_update) {
@@ -428,6 +428,7 @@ void InsetTabular::update(BufferView * b
        }
        in_update = false;
 }
+*/
 
 
 string const InsetTabular::editMessage() const
@@ -1285,8 +1286,8 @@ bool InsetTabular::calculate_dimensions_
                                continue;
                        ++cell;
                        inset = tabular->GetCellInset(cell);
-                       if (!reinit && !tabular->GetPWidth(cell).zero())
-                               inset->update(bv, false);
+                       //if (!reinit && !tabular->GetPWidth(cell).zero())
+                       //      inset->update(bv, false);
                        maxAsc = max(maxAsc, inset->ascent(bv, font));
                        maxDesc = max(maxDesc, inset->descent(bv, font));
                        changed = tabular->SetWidthOfCell(cell, inset->width(bv, 
font)) || changed;
Index: insets/insettext.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettext.C,v
retrieving revision 1.404
diff -u -p -r1.404 insettext.C
--- insets/insettext.C  2 Jun 2003 10:03:23 -0000       1.404
+++ insets/insettext.C  3 Jun 2003 07:03:48 -0000
@@ -422,7 +422,7 @@ void InsetText::draw(PainterInfo & pi, i
 
 void InsetText::drawFrame(Painter & pain, int x) const
 {
-       static int const ttoD2 = TEXT_TO_INSET_OFFSET / 2;
+       int const ttoD2 = TEXT_TO_INSET_OFFSET / 2;
        frame_x = x + ttoD2;
        frame_y = top_baseline - dim_.asc + ttoD2;
        frame_w = dim_.wid - TEXT_TO_INSET_OFFSET;
@@ -432,6 +432,7 @@ void InsetText::drawFrame(Painter & pain
 }
 
 
+/*
 void InsetText::update(BufferView * bv, bool reinit)
 {
        if (in_update) {
@@ -492,6 +493,7 @@ void InsetText::update(BufferView * bv, 
                old_max_width = nw;
        }
 }
+*/
 
 
 void InsetText::setUpdateStatus(BufferView * bv, int what) const

Reply via email to