From: André Pönitz Date: Fri, 12 Oct 2001 13:29:46 +0000 (+0000) Subject: cosmetics X-Git-Tag: 1.6.10~20489 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=748af630f5ff230674fb7d341972c73660971f25;p=features.git cosmetics git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2871 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/formulabase.C b/src/mathed/formulabase.C index 7d5f21c3a0..eebcfc8703 100644 --- a/src/mathed/formulabase.C +++ b/src/mathed/formulabase.C @@ -1,4 +1,4 @@ - /* +/* * File: formulabase.C * Purpose: Implementation of common parts of the LyX math insets * Author: Alejandro Aguilar Sierra @@ -508,11 +508,6 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action, case LFUN_MATH_SPACE: { bv->lockedInsetStoreUndo(Undo::EDIT); - //MathSpaceInset * p = mathcursor->prevSpaceInset(); - //if (p) - // p->incSpace(); - //else - // mathcursor->insert(new MathSpaceInset(1)); mathcursor->insert(MathAtom(new MathSpaceInset(1))); updateLocal(bv, true); break; diff --git a/src/mathed/math_cursor.C b/src/mathed/math_cursor.C index 0129b4531e..a0d1ecbb43 100644 --- a/src/mathed/math_cursor.C +++ b/src/mathed/math_cursor.C @@ -1340,9 +1340,8 @@ void MathCursor::interpret(char c) } if (c == ' ') { - MathSpaceInset * p = prevSpaceInset(); - if (p) { - p->incSpace(); + if (hasPrevAtom() && prevAtom()->asSpaceInset()) { + prevAtom()->asSpaceInset()->incSpace(); return; } @@ -1465,9 +1464,3 @@ MathCursorPos MathCursor::normalAnchor() const } -MathSpaceInset * MathCursor::prevSpaceInset() const -{ - if (!hasPrevAtom()) - return 0; - return prevAtom()->asSpaceInset(); -} diff --git a/src/mathed/math_cursor.h b/src/mathed/math_cursor.h index f6e50b218a..3129380265 100644 --- a/src/mathed/math_cursor.h +++ b/src/mathed/math_cursor.h @@ -242,23 +242,11 @@ public: /// MathCursorPos const & cursor() const; - - /// - pos_type last() const; /// void seldump(char const * str) const; /// void dump(char const * str) const; - /// - void merge(MathArray const & arr); - /// - MathScriptInset * prevScriptInset() const; - /// - MathSpaceInset * prevSpaceInset() const; - /// glue adjacent atoms if possible - bool glueAdjacentAtoms(); - /// friend class Selection;