diff --git a/src/BufferView2.C b/src/BufferView2.C index fd42b2873c..b32045a32f 100644 --- a/src/BufferView2.C +++ b/src/BufferView2.C @@ -276,10 +276,12 @@ void BufferView::insertErrors(TeXErrors & terr) if (texrowpar == 0) continue; + freezeUndo(); InsetError * new_inset = new InsetError(msgtxt); text->setCursorIntern(this, texrowpar, tmppos); text->insertInset(this, new_inset); text->fullRebreak(this); + unFreezeUndo(); } // Restore the cursor position text->setCursorIntern(this, cursor.par(), cursor.pos()); diff --git a/src/ChangeLog b/src/ChangeLog index 82fc02e351..afe84ae8c6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2002-08-12 Juergen Vigna + + * BufferView2.C (insertErrors): forbid undo when inserting error + insets. + + * CutAndPaste.C (SwitchLayoutsBetweenClasses): ditto + 2002-08-12 Lars Gullik Bjønnes * ParagraphList.[Ch]: new files diff --git a/src/CutAndPaste.C b/src/CutAndPaste.C index ba7f093c06..6117a50481 100644 --- a/src/CutAndPaste.C +++ b/src/CutAndPaste.C @@ -24,7 +24,7 @@ #include "gettext.h" #include "iterators.h" #include "lyxtextclasslist.h" - +#include "undo_funcs.h" #include "insets/inseterror.h" using std::pair; @@ -427,6 +427,7 @@ int CutAndPaste::SwitchLayoutsBetweenClasses(textclass_type c1, + _("\nbecause of class conversion from\n") + tclass1.name() + _(" to ") + tclass2.name(); + freezeUndo(); InsetError * new_inset = new InsetError(s); LyXText * txt = current_view->getLyXText(); LyXCursor cur = txt->cursor; @@ -434,6 +435,7 @@ int CutAndPaste::SwitchLayoutsBetweenClasses(textclass_type c1, txt->insertInset(current_view, new_inset); txt->fullRebreak(current_view); txt->setCursorIntern(current_view, cur.par(), cur.pos()); + unFreezeUndo(); } } return ret;