[LyX/master] InsetMathMacoTemplate: recompute metrics on editXY too
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Tue Jun 11 15:08:15 UTC 2024
commit b54d3520753f79231c9f09a45f4efd9c8ac2d90a
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date: Tue Jun 11 17:04:58 2024 +0200
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().
---
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 9b2fd19dab..94760d4060 100644
--- a/src/mathed/InsetMathMacroTemplate.cpp
+++ b/src/mathed/InsetMathMacroTemplate.cpp
@@ -625,6 +625,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 785385a7db..ba17a91742 100644
--- a/src/mathed/InsetMathMacroTemplate.h
+++ b/src/mathed/InsetMathMacroTemplate.h
@@ -43,6 +43,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(support::Lexer & lex) override;
More information about the lyx-cvs
mailing list