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().
This commit is contained in:
Jean-Marc Lasgouttes 2024-06-11 17:04:58 +02:00
parent f48cf46101
commit b54d352075
2 changed files with 10 additions and 0 deletions

View File

@ -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();

View File

@ -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;