From: Stefan Schimanski Date: Thu, 1 Nov 2007 14:45:14 +0000 (+0000) Subject: * one coercion is enough X-Git-Tag: 1.6.10~7557 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b5a640d1cc453b1336a378f7beea84f1834aa260;p=lyx.git * one coercion is enough git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21335 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Cursor.cpp b/src/Cursor.cpp index 3fa8a4af07..2d8f777c6d 100644 --- a/src/Cursor.cpp +++ b/src/Cursor.cpp @@ -945,10 +945,10 @@ bool Cursor::macroModeClose() if (in && in->interpretString(*this, s)) return true; MathAtom atom = createInsetMath(name); - if (atom.nucleus()->asMacro()) { + MathMacro * atomAsMacro = atom.nucleus()->asMacro(); + if (atomAsMacro) { // make non-greedy, i.e. don't eat parameters from the right - MathMacro * macro = atom.nucleus()->asMacro(); - macro->setDisplayMode(MathMacro::DISPLAY_NONGREEDY_INIT); + atomAsMacro->setDisplayMode(MathMacro::DISPLAY_NONGREEDY_INIT); } plainInsert(atom); return true;