On Wed, Nov 11, 2020 at 05:13:51PM +0100, Richard Kimberly Heck wrote:
> commit fdd0a6f84923f1d4a1f82457a3e256a2ee706f6b
> Author: Richard Kimberly Heck <rikih...@lyx.org>
> Date:   Wed Nov 11 11:24:59 2020 -0500
> 
>     Revert "Improve structure of updateMacros"
>     
>     The problem here is that the check against TEXT_CODE only
>     catches InsetText, and not its subclasses. Same for the check
>     against MATH_HULL_CODE. So there is reason not to check codes
>     here.
>     
>     This reverts commit 5a54ccfa87057fd3220d7193b40ac2dd37a9e6e1.
> ---
> [cut] 
> diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp
> index ce1f4b5..39d5f80 100644
> --- a/src/mathed/MathData.cpp
> +++ b/src/mathed/MathData.cpp
> @@ -403,8 +403,8 @@ void MathData::updateMacros(Cursor * cur, MacroContext 
> const & mc,
>  {
>       // If we are editing a macro, we cannot update it immediately,
>       // otherwise wrong undo steps will be recorded (bug 6208).
> -     InsetMath const * inmath = cur ? cur->inset().asInsetMath() : nullptr;
> -     InsetMathMacro const * inmacro = inmath ? inmath->asMacro() : nullptr;
> +     InsetMath const * inmath = cur ? cur->inset().asInsetMath() : 0;
> +     InsetMathMacro const * inmacro = inmath ? inmath->asMacro() : 0;
>       docstring const edited_name = inmacro ? inmacro->name() : docstring();

Should we still keep the above nullptr changes?

Scott

Attachment: signature.asc
Description: PGP signature

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to