branch: Fix bug #6158: Crash when entering math in tabular.

We have to determine whether we are in an empty cell before we dispatch the lfun to the inset. Otherwise we determine whether the math is empty and if so, we then go to the next cell in the math inset. This cell doesn't exist probably.

see r31121.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31139 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-08-19 10:45:23 +00:00
parent 3d6a867b5c
commit afa885378c
2 changed files with 4 additions and 2 deletions

View File

@ -3434,10 +3434,10 @@ void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
&& cur.pos() == cur.lastpos())
|| (!next_cell && cur.pit() == 0 && cur.pos() == 0));
bool const empty_cell = cur.lastpos() == 0 && cur.lastpit() == 0;
// ...try to dispatch to the cell's inset.
cell(cur.idx())->dispatch(cur, cmd);
bool const empty_cell = cur.lastpos() == 0 && cur.lastpit() == 0;
// When we already have a selection we want to select the whole cell
// before going to the next cell.

View File

@ -209,6 +209,8 @@ What's new
- Fix a crash when performing instant preview on an uncodable character
(bug 6116).
- Fix a crash when navigating in a table with math insets (bug 6158).
- Fix communication between lyxclient and server, which leads to a
crash once CTRL+D is used on the client side (bug 6106).