Correctly restore a dissolved macro inset on undo (bug #6678).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34454 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-05-22 17:15:57 +00:00
parent eaf00dbea8
commit a7795cf303
3 changed files with 6 additions and 2 deletions

View File

@ -296,7 +296,8 @@ void Undo::Private::doRecordUndo(UndoKind kind,
// fill in the real data to be saved
if (cell.inMathed()) {
// simply use the whole cell
undo.array = new MathData(cell.cell());
MathData & ar = cell.cell();
undo.array = new MathData(ar.buffer(), ar.begin(), ar.end());
} else {
// some more effort needed here as 'the whole cell' of the
// main Text _is_ the whole document.

View File

@ -391,7 +391,9 @@ void MathData::updateMacros(Cursor * cur, MacroContext const & mc)
if (!macroInset || macroInset->name_.empty()
|| macroInset->name_[0] == '^'
|| macroInset->name_[0] == '_'
|| macroInset->name() == edited_name)
|| (macroInset->name() == edited_name
&& macroInset->displayMode() ==
MathMacro::DISPLAY_UNFOLDED))
continue;
// get macro

View File

@ -60,6 +60,7 @@ What's new
* USER INTERFACE
- Correctly restore a dissolved macro inset on undo (bug 6678).
* DOCUMENTATION AND LOCALIZATION