mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Avoid duplicating mode changing commands
This commit is contained in:
parent
324651899e
commit
5cdbaf51ee
@ -1450,13 +1450,15 @@ bool Cursor::macroModeClose()
|
||||
atom.nucleus()->cell(0).append(selection);
|
||||
|
||||
if (in->currentMode() == Inset::TEXT_MODE
|
||||
&& atom.nucleus()->currentMode() == Inset::MATH_MODE) {
|
||||
&& atom.nucleus()->currentMode() == Inset::MATH_MODE
|
||||
&& name != from_ascii("ensuremath")) {
|
||||
MathAtom at(new InsetMathEnsureMath(buffer()));
|
||||
at.nucleus()->cell(0).push_back(atom);
|
||||
niceInsert(at);
|
||||
posForward();
|
||||
} else if (in->currentMode() == Inset::MATH_MODE
|
||||
&& atom.nucleus()->currentMode() == Inset::TEXT_MODE) {
|
||||
&& atom.nucleus()->currentMode() == Inset::TEXT_MODE
|
||||
&& name != from_ascii("text")) {
|
||||
MathAtom at = createInsetMath("text", buffer());
|
||||
at.nucleus()->cell(0).push_back(atom);
|
||||
niceInsert(at);
|
||||
|
Loading…
Reference in New Issue
Block a user