mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
Fix another instance of missing buffer in math. This is needed when
pasting a macro inside another math inset (such as \text or \hat). In this case the buffer would not be set and getMacro() cannot be called, such that an "internal" macro would still shadow an user defined one. This kind of fix is now easy after Abdel's overhaul. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31998 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8340a17e96
commit
3f3bedd0d9
@ -1301,7 +1301,7 @@ void Cursor::insert(Inset * inset0)
|
||||
|
||||
void Cursor::niceInsert(docstring const & t, Parse::flags f)
|
||||
{
|
||||
MathData ar;
|
||||
MathData ar(buffer());
|
||||
asArray(t, ar, f);
|
||||
if (ar.size() == 1)
|
||||
niceInsert(ar[0]);
|
||||
@ -1322,7 +1322,7 @@ void Cursor::niceInsert(MathAtom const & t)
|
||||
// push the clone, not the original
|
||||
pushBackward(*nextInset());
|
||||
// We may not use niceInsert here (recursion)
|
||||
MathData ar;
|
||||
MathData ar(buffer());
|
||||
asArray(safe, ar);
|
||||
insert(ar);
|
||||
}
|
||||
@ -1473,7 +1473,7 @@ bool Cursor::macroModeClose()
|
||||
return false;
|
||||
InsetMathUnknown * p = activeMacro();
|
||||
p->finalize();
|
||||
MathData selection;
|
||||
MathData selection(buffer());
|
||||
asArray(p->selection(), selection);
|
||||
docstring const s = p->name();
|
||||
--pos();
|
||||
|
Loading…
Reference in New Issue
Block a user