Proper fix for bug #5923 that doesn't introduce bug #6015.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30410 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2009-07-08 01:48:19 +00:00
parent 98fb455d3f
commit 6852e976b0

View File

@ -386,6 +386,19 @@ void MathData::updateMacros(Cursor * cur, MacroContext const & mc)
|| macroInset->name_[0] == '_')
continue;
if (macroInset->displayMode() == MathMacro::DISPLAY_UNFOLDED) {
docstring const & unfolded_name = macroInset->name();
if (unfolded_name != macroInset->name_) {
// macro name was changed
cur->recordUndoInset();
cur->leaveInset(*macroInset);
cur->plainErase();
cur->insert(MathAtom(new InsetMathUnknown('\\'
+ unfolded_name, docstring(), false)));
continue;
}
}
// get macro
macroInset->updateMacro(mc);
size_t macroNumArgs = 0;