mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
Fix bug #6939 (Using math-insert to input math macros overwrites math expressions)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@36526 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5be2b2ed37
commit
3e722cd656
@ -1300,6 +1300,15 @@ void Cursor::niceInsert(MathAtom const & t)
|
||||
MathData ar(&buffer());
|
||||
asArray(safe, ar);
|
||||
insert(ar);
|
||||
} else if (t->asMacro() && !safe.empty()) {
|
||||
MathData ar(&buffer());
|
||||
asArray(safe, ar);
|
||||
docstring const name = t->asMacro()->name();
|
||||
MacroData const * data = buffer().getMacro(name);
|
||||
if (data && data->numargs() - data->optionals() > 0) {
|
||||
plainInsert(MathAtom(new InsetMathBrace(ar)));
|
||||
posBackward();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,9 @@ What's new
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
- Fix insertion of a user math macro trough the math-insert lfun when a
|
||||
selection is present (bug 6939).
|
||||
|
||||
- Make the modules description in Document > Settings fully translatable
|
||||
(bug 6987).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user