mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
Don't create undos for inserting Error insets. What is missing still is that
before actually doing any undo we should remove "AutoInsets". git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4939 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
49c09933c9
commit
ddc06a6e29
@ -276,10 +276,12 @@ void BufferView::insertErrors(TeXErrors & terr)
|
|||||||
if (texrowpar == 0)
|
if (texrowpar == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
freezeUndo();
|
||||||
InsetError * new_inset = new InsetError(msgtxt);
|
InsetError * new_inset = new InsetError(msgtxt);
|
||||||
text->setCursorIntern(this, texrowpar, tmppos);
|
text->setCursorIntern(this, texrowpar, tmppos);
|
||||||
text->insertInset(this, new_inset);
|
text->insertInset(this, new_inset);
|
||||||
text->fullRebreak(this);
|
text->fullRebreak(this);
|
||||||
|
unFreezeUndo();
|
||||||
}
|
}
|
||||||
// Restore the cursor position
|
// Restore the cursor position
|
||||||
text->setCursorIntern(this, cursor.par(), cursor.pos());
|
text->setCursorIntern(this, cursor.par(), cursor.pos());
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
2002-08-12 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
|
* BufferView2.C (insertErrors): forbid undo when inserting error
|
||||||
|
insets.
|
||||||
|
|
||||||
|
* CutAndPaste.C (SwitchLayoutsBetweenClasses): ditto
|
||||||
|
|
||||||
2002-08-12 Lars Gullik Bjønnes <larsbj@gullik.net>
|
2002-08-12 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
* ParagraphList.[Ch]: new files
|
* ParagraphList.[Ch]: new files
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "iterators.h"
|
#include "iterators.h"
|
||||||
#include "lyxtextclasslist.h"
|
#include "lyxtextclasslist.h"
|
||||||
|
#include "undo_funcs.h"
|
||||||
#include "insets/inseterror.h"
|
#include "insets/inseterror.h"
|
||||||
|
|
||||||
using std::pair;
|
using std::pair;
|
||||||
@ -427,6 +427,7 @@ int CutAndPaste::SwitchLayoutsBetweenClasses(textclass_type c1,
|
|||||||
+ _("\nbecause of class conversion from\n")
|
+ _("\nbecause of class conversion from\n")
|
||||||
+ tclass1.name() + _(" to ")
|
+ tclass1.name() + _(" to ")
|
||||||
+ tclass2.name();
|
+ tclass2.name();
|
||||||
|
freezeUndo();
|
||||||
InsetError * new_inset = new InsetError(s);
|
InsetError * new_inset = new InsetError(s);
|
||||||
LyXText * txt = current_view->getLyXText();
|
LyXText * txt = current_view->getLyXText();
|
||||||
LyXCursor cur = txt->cursor;
|
LyXCursor cur = txt->cursor;
|
||||||
@ -434,6 +435,7 @@ int CutAndPaste::SwitchLayoutsBetweenClasses(textclass_type c1,
|
|||||||
txt->insertInset(current_view, new_inset);
|
txt->insertInset(current_view, new_inset);
|
||||||
txt->fullRebreak(current_view);
|
txt->fullRebreak(current_view);
|
||||||
txt->setCursorIntern(current_view, cur.par(), cur.pos());
|
txt->setCursorIntern(current_view, cur.par(), cur.pos());
|
||||||
|
unFreezeUndo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user