mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 07:42:02 +00:00
Fix bug #6351: Crash when editing the unit on a number
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32211 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9e5f3a9423
commit
ae40a33202
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user