]> git.lyx.org Git - lyx.git/commitdiff
no special treatment for scriptinsets
authorAndré Pönitz <poenitz@gmx.net>
Thu, 1 Aug 2002 11:48:53 +0000 (11:48 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 1 Aug 2002 11:48:53 +0000 (11:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4826 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_cursor.C
src/mathed/math_fontinset.C
src/mathed/math_scriptinset.C

index aebf2fa50415d33fd36b46966f2a773a43291b13..1eb3180096b8aebe2647f39b68f06a07a3496f69 100644 (file)
@@ -189,8 +189,6 @@ bool MathCursor::inNucleus() const
 
 bool MathCursor::posLeft()
 {
-       if (inNucleus())
-               return false;
        if (pos() == 0)
                return false;
        --pos();
@@ -454,6 +452,7 @@ void MathCursor::backspace()
                return;
        }
 
+/*
        if (prevAtom()->asScriptInset()) {
                // simply enter nucleus
                left();
@@ -465,6 +464,7 @@ void MathCursor::backspace()
                if (pos() == 1) {
                }
        }
+*/
 
        --pos();
        plainErase();
@@ -493,6 +493,7 @@ void MathCursor::erase()
                return;
        }
 
+/*
        // if we are standing in front of a script inset, grab item before us and
        // move it into nucleus
        // and remove first thing.
@@ -513,6 +514,7 @@ void MathCursor::erase()
                }
                return;
        }
+*/
 
        plainErase();
 }
index 4283014d81110ed960ccd90993b61ac6b3fa1289..ef7cdb7393ce2889ff2c5348f1c7c6a71c03ff01 100644 (file)
@@ -31,7 +31,11 @@ MathInset * MathFontInset::clone() const
 
 MathInset::mode_type MathFontInset::currentMode() const
 {
-       return key_->extra == "mathmode" ? MATH_MODE : TEXT_MODE;
+       if (key_->extra == "mathmode")
+               return MATH_MODE;
+       if (key_->extra == "textmode")
+               return TEXT_MODE;
+       return UNDECIDED_MODE;
 }
 
 
index eeccab358e9a3ed6b51f50408ee3de6a4e0c7f4a..10223d75b15adf06231067900fa59fe24472da80 100644 (file)
@@ -60,7 +60,7 @@ MathScriptInset * MathScriptInset::asScriptInset()
 bool MathScriptInset::idxFirst(idx_type & idx, pos_type & pos) const
 {
        idx = 2;
-       pos = nuc().size();
+       pos = 0;
        return true;
 }
 
@@ -202,7 +202,7 @@ void MathScriptInset::metrics(MathMetricsInfo & mi) const
        }
        dim_.a = dy1() + (hasUp() ? up().ascent() : 0);
        dim_.d = dy0() + (hasDown() ? down().descent() : 0);
-       metricsMarkers();
+       metricsMarkers2();
 }
 
 
@@ -217,7 +217,7 @@ void MathScriptInset::draw(MathPainterInfo & pi, int x, int y) const
                up().draw(pi, x + dx1(), y - dy1());
        if (hasDown())
                down().draw(pi, x + dx0(), y + dy0());
-       drawMarkers(pi, x, y);
+       drawMarkers2(pi, x, y);
 }
 
 
@@ -460,6 +460,7 @@ void MathScriptInset::octavize(OctaveStream & os) const
 
 void MathScriptInset::infoize(std::ostream & os) const
 {
+       os << "Scripts";
        if (limits_)
-               os << (limits_ == 1 ? "Displayed limits" : "Inlined limits");
+               os << (limits_ == 1 ? ", Displayed limits" : ", Inlined limits");
 }