]> git.lyx.org Git - features.git/commitdiff
* fix a crash during undo: cloned MathMacroTemplates need updated child insets which...
authorStefan Schimanski <sts@lyx.org>
Tue, 8 Jan 2008 10:29:47 +0000 (10:29 +0000)
committerStefan Schimanski <sts@lyx.org>
Tue, 8 Jan 2008 10:29:47 +0000 (10:29 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22430 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/MathMacroTemplate.cpp

index 0189e6ff4aa71ca9391a9a2d4b89aa5117cc9db1..85301fbfe091ad9c86c77c4d4339f6e4c4aaf10e 100644 (file)
@@ -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;
 }