]> git.lyx.org Git - features.git/commitdiff
Fix bug #2045.
authorPavel Sanda <sanda@lyx.org>
Wed, 12 Aug 2009 22:09:50 +0000 (22:09 +0000)
committerPavel Sanda <sanda@lyx.org>
Wed, 12 Aug 2009 22:09:50 +0000 (22:09 +0000)
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg153796.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30997 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathNest.cpp

index a0962e972a021e1c81210f5c40c29a6062569820..00e4f7b129a7d8b4553ef10e11d26c04aa8a21dc 100644 (file)
@@ -953,6 +953,10 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                handleFont(cur, cmd.argument(), "textnormal");
                break;
 
+       case LFUN_FONT_UNDERLINE:
+               cur.recordUndo();
+               cur.handleNest(createInsetMath("underline"));
+               break;
        case LFUN_MATH_MODE: {
 #if 1
                // ignore math-mode on when already in math mode
@@ -1288,6 +1292,7 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
                flag.setEnabled(true);
                break;
 
+       case LFUN_FONT_UNDERLINE:
        case LFUN_FONT_FRAK:
                flag.setEnabled(currentMode() != TEXT_MODE);
                break;