mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
fix undo crash
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8022 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c1319d2c67
commit
cac6814fed
@ -1,3 +1,7 @@
|
||||
2003-11-03 Alfredo Braunstein <abraunst@libero.it>
|
||||
|
||||
* undo.C (performUndoOrRedo): fix cursor positioning with lockPath
|
||||
|
||||
2003-11-03 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* text3.C (dispatch): adjust for new DisptchResult semantics.
|
||||
|
16
src/undo.C
16
src/undo.C
@ -184,9 +184,11 @@ bool performUndoOrRedo(BufferView * bv, Undo const & undo)
|
||||
|
||||
// set cursor
|
||||
lyxerr << "undo, text: " << undo.text
|
||||
<< " inset: " << pit.inset()
|
||||
<< " index: " << undo.index
|
||||
<< std::endl;
|
||||
<< " inset: " << pit.inset()
|
||||
<< " index: " << undo.index
|
||||
<< " par: " << undo.cursor_par
|
||||
<< " pos: " << undo.cursor_pos
|
||||
<< std::endl;
|
||||
|
||||
// set cursor again to force the position to be the right one
|
||||
text->cursor.par(undo.cursor_par);
|
||||
@ -200,12 +202,8 @@ bool performUndoOrRedo(BufferView * bv, Undo const & undo)
|
||||
// rebreak the entire lyxtext
|
||||
bv->text->fullRebreak();
|
||||
|
||||
InsetOld * inset = pit.inset();
|
||||
if (inset) {
|
||||
// magic needed to cope with inset locking
|
||||
bv->lockInset(dynamic_cast<UpdatableInset *>(inset));
|
||||
}
|
||||
|
||||
pit.lockPath(bv);
|
||||
|
||||
finishUndo();
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user