]> git.lyx.org Git - lyx.git/commitdiff
Fix #1736
authorAndré Pönitz <poenitz@gmx.net>
Sun, 7 Nov 2004 09:39:34 +0000 (09:39 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sun, 7 Nov 2004 09:39:34 +0000 (09:39 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9192 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ui/stdmenus.ui
src/mathed/math_data.C
src/mathed/math_nestinset.C

index d839b3532ff3b265fa1d63aa6dfe19880ee5db7a..ed5b41a0edac5d9c03a35a27d33bc95a6b357e29 100644 (file)
@@ -258,8 +258,8 @@ Menuset
        End
 
        Menu "insert_formatting"
-               Item "Superscript|S" "command-sequence math-mode ; math-superscript ; font-free-apply; "
-               Item "Subscript|u" "command-sequence math-mode ; math-subscript ; font-free-apply; "
+               Item "Superscript|S" "command-sequence math-mode on; math-superscript ; font-free-apply; "
+               Item "Subscript|u" "command-sequence math-mode on; math-subscript ; font-free-apply; "
                Separator
                Item "Protected Space|r" "space-insert protected"
                Item "Inter-word Space|w" "space-insert normal"
@@ -275,14 +275,14 @@ Menuset
        End
 
        Menu "insert_math"
-               Item "Inline Formula|I" "math-mode"
+               Item "Inline Formula|I" "math-mode on"
                Item "Display Formula|D" "math-display"
-               Item "Eqnarray Environment|E" "command-sequence math-mode; math-mutate eqnarray;"
-               Item "AMS align Environment|a" "command-sequence math-mode; math-mutate align;"
-               Item "AMS alignat Environment|t" "command-sequence math-mode; math-mutate alignat;"
-               Item "AMS flalign Environment|f" "command-sequence math-mode; math-mutate flalign;"
-               Item "AMS gather Environment|g" "command-sequence math-mode; math-mutate gather;"
-               Item "AMS multline Environment|m" "command-sequence math-mode; math-mutate multline;"
+               Item "Eqnarray Environment|E" "command-sequence math-mode on; math-mutate eqnarray;"
+               Item "AMS align Environment|a" "command-sequence math-mode on; math-mutate align;"
+               Item "AMS alignat Environment|t" "command-sequence math-mode on; math-mutate alignat;"
+               Item "AMS flalign Environment|f" "command-sequence math-mode on; math-mutate flalign;"
+               Item "AMS gather Environment|g" "command-sequence math-mode on; math-mutate gather;"
+               Item "AMS multline Environment|m" "command-sequence math-mode on; math-mutate multline;"
                Separator
                Item "Array Environment|y" "math-matrix 2 2"
                Item "Cases Environment|C" "math-insert \cases"
index 7c17e77e119db9685e31550b9baeefa196585cb5..e466a7178fd22321b39068756ba2e5e950d54984 100644 (file)
@@ -410,7 +410,7 @@ int MathArray::dist(int x, int y) const
 
 void MathArray::setXY(int x, int y) const
 {
-       lyxerr << "setting position cache for MathArray " << this << std::endl;
+       //lyxerr << "setting position cache for MathArray " << this << std::endl;
        theCoords.arrays_.add(this, x, y);
 }
 
index 5eaad59db7e44fd4ff96cd9a615724826aa1914f..7648cf26ca19ce6ce0cd90451a58a71a79f58632 100644 (file)
@@ -684,6 +684,9 @@ void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
 
        case LFUN_MATH_MODE:
 #if 1
+               // ignore math-mode on when already in math mode
+               if (currentMode() == InsetBase::MATH_MODE && cmd.argument == "on")
+                       break;
                cur.macroModeClose();
                selClearOrDel(cur);
                cur.plainInsert(MathAtom(new MathMBoxInset(cur.bv())));