> Can you redo this patch? It crashes slighly with what I had in my tree
> (that I just committed).

I attach a new diff.

Andre'

-- 
André Pönitz ........................................ [EMAIL PROTECTED]
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/ChangeLog,v
retrieving revision 1.53
diff -u -p -r1.53 ChangeLog
--- ChangeLog   2001/03/05 10:18:36     1.53
+++ ChangeLog   2001/03/05 10:46:13
@@ -1,3 +1,10 @@
+
+2001-02-14  André Pönitz  <[EMAIL PROTECTED]>
+  * math_macrotemplate.[Ch]:
+    math_macro.C: move update() functionality to the macro
+
+       * math_rowst.h: split MathedRowSt into "data" and "list"
+
 2001-03-01  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
        * math_macrotemplate.C (update): use MathMacro::getArg, and
Index: math_macro.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_macro.C,v
retrieving revision 1.49
diff -u -p -r1.49 math_macro.C
--- math_macro.C        2001/03/05 10:18:36     1.49
+++ math_macro.C        2001/03/05 10:46:13
@@ -74,8 +74,8 @@ MathedInset * MathMacro::Clone()
 
 void MathMacro::Metrics()
 {
-       if (args_.size() > 0)
-               tmplate_->update(*this);
+       for (int i = 0; i < args_.size(); ++i) 
+    tmplate_->args_[i] = getArg(i);
        tmplate_->SetStyle(size());
        tmplate_->Metrics();
        width = tmplate_->Width();
Index: math_macrotemplate.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_macrotemplate.C,v
retrieving revision 1.12
diff -u -p -r1.12 math_macrotemplate.C
--- math_macrotemplate.C        2001/03/05 10:18:36     1.12
+++ math_macrotemplate.C        2001/03/05 10:46:13
@@ -116,14 +116,6 @@ void MathMacroTemplate::Metrics()
 }
 
 
-void MathMacroTemplate::update(MathMacro const & macro)
-{
-       for (int i = 0; i < nargs_; ++i) {
-               args_[i] = macro.getArg(i);
-       }
-}
-
-
 void MathMacroTemplate::WriteDef(ostream & os, bool fragile)
 {
        os << "\n\\newcommand{\\" << name << "}";
@@ -158,6 +150,13 @@ MathParInset * MathMacroTemplate::getMac
        } else 
                return 0;
 }
+
+void MathMacroTemplate::setMacroPar(int i, MathedArray const & ar)
+{
+       if (i >= 0 && i < nargs_)
+               args_[i].setData(ar);
+}
+
 
 
 void MathMacroTemplate::SetMacroFocus(int &idx, int x, int y)
Index: math_macrotemplate.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/math_macrotemplate.h,v
retrieving revision 1.8
diff -u -p -r1.8 math_macrotemplate.h
--- math_macrotemplate.h        2001/03/05 10:18:36     1.8
+++ math_macrotemplate.h        2001/03/05 10:46:13
@@ -43,12 +43,11 @@ public:
        ///
        MathParInset * getMacroPar(int) const;
        ///
+       void setMacroPar(int, MathedArray const &);
+       ///
        void SetMacroFocus(int &, int, int);
        ///
        void setEditMode(bool);
-       
-       /// Replace the appropriate arguments with a specific macro's data
-       void update(MathMacro const & m);
 private:
        /// Are we in edit mode or not?
        bool edit_;

Reply via email to