From: André Pönitz Date: Thu, 1 Aug 2002 11:48:53 +0000 (+0000) Subject: no special treatment for scriptinsets X-Git-Tag: 1.6.10~18714 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0fdd672d647f8db767707a14f8483224721f9f70;p=lyx.git no special treatment for scriptinsets git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4826 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index aebf2fa504..1eb3180096 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -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(); } diff --git a/src/mathed/math_fontinset.C b/src/mathed/math_fontinset.C index 4283014d81..ef7cdb7393 100644 --- a/src/mathed/math_fontinset.C +++ b/src/mathed/math_fontinset.C @@ -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; } diff --git a/src/mathed/math_scriptinset.C b/src/mathed/math_scriptinset.C index eeccab358e..10223d75b1 100644 --- a/src/mathed/math_scriptinset.C +++ b/src/mathed/math_scriptinset.C @@ -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"); }