Fixed crash in undo_cursor putting and better saving of the undo_cursor in

not locked tabular cells.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3256 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2001-12-20 16:08:02 +00:00
parent 1070702ea4
commit a9259a595c
4 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2001-12-20 Juergen Vigna <jug@sad.it>
* undo_funcs.C (textHandleUndo): fixed crash when undo_cursor not
inside inset but undo_par was.
2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* Thesaurus.C: always include <config.h> in sources.
@ -35,7 +40,6 @@
* tabular_funcs.[hC]: added and moved here all not classfunctions
of LyXTabular.
>>>>>>> 1.472
2001-12-19 Juergen Vigna <jug@sad.it>
* tabular.[Ch]: better support for longtabular options (not finished

View File

@ -1,5 +1,8 @@
2001-12-20 Juergen Vigna <jug@sad.it>
* inset.C (cursor): return the owners cursor if available instead of
always only the bv->text->cursor.
* insettabular.C (checkLongtableSpecial): works now.
2001-12-19 Juergen Vigna <jug@sad.it>

View File

@ -347,6 +347,8 @@ int UpdatableInset::getMaxWidth(BufferView * bv, UpdatableInset const *) const
LyXCursor const & Inset::cursor(BufferView * bv) const
{
if (owner())
return owner()->getLyXText(bv, false)->cursor;
return bv->text->cursor;
}

View File

@ -228,9 +228,15 @@ bool textHandleUndo(BufferView * bv, Undo * undo)
bv->text->cursor.par());
if (tmppar){
it = static_cast<UpdatableInset*>(tmppar->inInset());
LyXText * t;
if (it) {
it->edit(bv);
it->getLyXText(bv)->setCursorIntern(bv, tmppar, undo->cursor_pos);
it->getLyXText(bv)->updateCounters(bv, it->getLyXText(bv)->cursor.row());
t = it->getLyXText(bv);
} else {
t = bv->text;
}
t->setCursorIntern(bv, tmppar, undo->cursor_pos);
t->updateCounters(bv, t->cursor.row());
}
bv->text->setCursorIntern(bv, bv->text->cursor.par(),
bv->text->cursor.pos());