]> git.lyx.org Git - features.git/commitdiff
InsetMathMacoTemplate: recompute metrics on editXY too biginset
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 11 Jun 2024 15:04:58 +0000 (17:04 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 11 Jun 2024 15:08:54 +0000 (17:08 +0200)
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
src/mathed/InsetMathMacroTemplate.h

index 2a721833b0cc8ffaed7ce91c0cb1682d1e4f1205..4fb50b1a4cabcca8597a42f59ed1dbdba96f6d5e 100644 (file)
@@ -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();
index 105dcfb7ff938192161c09223354ef2e6c6b2e0b..4cf993918cef3da6de0cffbcba2ebfb6e64f0bd1 100644 (file)
@@ -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;