provide default type value for math-macro

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10512 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2005-10-03 10:53:40 +00:00
parent 2df2f11f5d
commit c16067dbba
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-10-03 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* text3.C (dispatch): when invoking LFUN_MATH_MACRO with no type
argument, use "newcommand".
2005-09-28 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* cursor.C (setSelection): do not open collapsable insets;

View File

@ -1254,7 +1254,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
int const nargs = s1.empty() ? 0 : convert<int>(s1);
string const s2 = token(s, ' ', 2);
string const type = s2.empty() ? "newcommand" : s2;
cur.insert(new MathMacroTemplate(token(s, ' ', 0), nargs, s2));
cur.insert(new MathMacroTemplate(token(s, ' ', 0), nargs, type));
//cur.nextInset()->edit(cur, true);
}
break;