mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fixup 097da3a9
: fix horizontal navigatiion in InsetMathRoot
Exchanging cells 0 and 1 requires to implement idxBackWard/Forward.
This commit is contained in:
parent
974766cd1c
commit
2daf493cbc
@ -156,6 +156,30 @@ bool InsetMathRoot::idxUpDown(Cursor & cur, bool up) const
|
||||
}
|
||||
|
||||
|
||||
bool InsetMathRoot::idxForward(Cursor & cur) const
|
||||
{
|
||||
// nucleus is 0 and is on the right
|
||||
if (cur.idx() == 0)
|
||||
return false;
|
||||
else
|
||||
cur.idx() = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool InsetMathRoot::idxBackward(Cursor & cur) const
|
||||
{
|
||||
// nucleus is 0 and is on the right
|
||||
if (cur.idx() == 1)
|
||||
return false;
|
||||
else
|
||||
cur.idx() = 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void InsetMathRoot::maple(MapleStream & os) const
|
||||
{
|
||||
os << '(' << cell(0) << ")^(1/(" << cell(1) <<"))";
|
||||
|
@ -26,6 +26,10 @@ public:
|
||||
InsetMathRoot(Buffer * buf);
|
||||
///
|
||||
bool idxUpDown(Cursor & cur, bool up) const;
|
||||
///
|
||||
bool idxForward(Cursor & cur) const;
|
||||
///
|
||||
bool idxBackward(Cursor & cur) const;
|
||||
|
||||
///
|
||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
|
Loading…
Reference in New Issue
Block a user