From c4d85b3f1d520e3736cc20b48049c1acf896da85 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Tue, 8 Jan 2008 10:29:47 +0000 Subject: [PATCH] * fix a crash during undo: cloned MathMacroTemplates need updated child insets which point back to the correct (cloned) template. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22430 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/MathMacroTemplate.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index 0189e6ff4a..85301fbfe0 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -393,7 +393,11 @@ MathMacroTemplate::MathMacroTemplate(docstring const & str) Inset * MathMacroTemplate::clone() const { - return new MathMacroTemplate(*this); + MathMacroTemplate * inset = new MathMacroTemplate(*this); + // the parent pointers of the proxy insets above will point to + // to the old template. Hence, the look must be updated. + inset->updateLook(); + return inset; }