Fix bug #6351: Crash when editing the unit on a number

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@32214 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2009-11-26 13:47:20 +00:00
parent f60f33e90b
commit 8e8ce41eeb
2 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,9 @@ InsetMathFracBase::InsetMathFracBase(Buffer * buf, idx_type ncells)
bool InsetMathFracBase::idxUpDown(Cursor & cur, bool up) const
{
InsetMath::idx_type target = !up; // up ? 0 : 1, since upper cell has idx 0
// If we only have one cell, target = 0, otherwise
// target = up ? 0 : 1, since upper cell has idx 0
InsetMath::idx_type target = nargs() > 1 ? !up : 0;
if (cur.idx() == target)
return false;
cur.idx() = target;

View File

@ -129,6 +129,8 @@ What's new
- Fix a crash when loading a document that specifies mutltiple labels
for an equation (bug 5968).
- Fix crash when moving down with the cursor in a Unit inset (bug 6351).
- When using the PDF-Pages external inset, copy the included PDF file to
the temporary directory, where LaTeX searches it (bug 6345).