From b2b565e6cbfda5c62b22610617fef0b6d5472c62 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 11 Jun 2024 17:04:58 +0200 Subject: [PATCH] InsetMathMacoTemplate: recompute metrics on editXY too This inset can change dimensions when edited (like macros can). Therefore Update::SinglePar should be set with editXY() like it is already set for edit(). (cherry picked from commit b54d3520753f79231c9f09a45f4efd9c8ac2d90a) --- src/mathed/InsetMathMacroTemplate.cpp | 8 ++++++++ src/mathed/InsetMathMacroTemplate.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/mathed/InsetMathMacroTemplate.cpp b/src/mathed/InsetMathMacroTemplate.cpp index 2a721833b0..4fb50b1a4c 100644 --- a/src/mathed/InsetMathMacroTemplate.cpp +++ b/src/mathed/InsetMathMacroTemplate.cpp @@ -613,6 +613,14 @@ void InsetMathMacroTemplate::edit(Cursor & cur, bool front, EntryDirection entry } +Inset * InsetMathMacroTemplate::editXY(Cursor & cur, int x, int y) +{ + updateLook(); + cur.screenUpdateFlags(Update::SinglePar); + return InsetMathNest::editXY(cur, x, y); +} + + bool InsetMathMacroTemplate::notifyCursorLeaves(Cursor const & old, Cursor & cur) { unsigned int const nargs_before = nargs(); diff --git a/src/mathed/InsetMathMacroTemplate.h b/src/mathed/InsetMathMacroTemplate.h index 105dcfb7ff..4cf993918c 100644 --- a/src/mathed/InsetMathMacroTemplate.h +++ b/src/mathed/InsetMathMacroTemplate.h @@ -41,6 +41,8 @@ public: /// void edit(Cursor & cur, bool front, EntryDirection entry_from) override; /// + Inset * editXY(Cursor & cur, int x, int y) override; + /// bool notifyCursorLeaves(Cursor const & old, Cursor & cur) override; /// void read(Lexer & lex) override; -- 2.39.5