]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_rootinset.C
oh well
[lyx.git] / src / mathed / math_rootinset.C
index 597cf0a9ce6f2002d47b6e5da6d3eb71930cc1c2..2a7185895da503e2a191bdedf227d855455f4927 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  File:        math_root.C
- *  Purpose:     Implementation of the root object 
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx> 
+ *  Purpose:     Implementation of the root object
+ *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
  *  Created:     January 1999
  *  Description: Root math object
  *
@@ -71,24 +71,16 @@ void MathRootInset::write(WriteStream & os) const
 
 void MathRootInset::normalize(NormalStream & os) const
 {
-       os << "[root " << cell(1) << ' ' << cell(1) << ']';
+       os << "[root " << cell(0) << ' ' << cell(1) << ']';
 }
 
 
-bool MathRootInset::idxUp(idx_type & idx) const
+bool MathRootInset::idxUpDown(idx_type & idx, bool up) const
 {
-       if (idx == 0)
+       bool target = !up; // up ? 0 : 1;
+       if (idx == target)
                return false;
-       idx = 0;
-       return true;
-}
-
-
-bool MathRootInset::idxDown(idx_type & idx) const
-{
-       if (idx == 1)
-               return false;
-       idx = 1;
+       idx = target;
        return true;
 }