mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
no special treatment for scriptinsets
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4826 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2e835ba909
commit
0fdd672d64
@ -189,8 +189,6 @@ bool MathCursor::inNucleus() const
|
||||
|
||||
bool MathCursor::posLeft()
|
||||
{
|
||||
if (inNucleus())
|
||||
return false;
|
||||
if (pos() == 0)
|
||||
return false;
|
||||
--pos();
|
||||
@ -454,6 +452,7 @@ void MathCursor::backspace()
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
if (prevAtom()->asScriptInset()) {
|
||||
// simply enter nucleus
|
||||
left();
|
||||
@ -465,6 +464,7 @@ void MathCursor::backspace()
|
||||
if (pos() == 1) {
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
--pos();
|
||||
plainErase();
|
||||
@ -493,6 +493,7 @@ void MathCursor::erase()
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
// if we are standing in front of a script inset, grab item before us and
|
||||
// move it into nucleus
|
||||
// and remove first thing.
|
||||
@ -513,6 +514,7 @@ void MathCursor::erase()
|
||||
}
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
plainErase();
|
||||
}
|
||||
|
@ -31,7 +31,11 @@ MathInset * MathFontInset::clone() const
|
||||
|
||||
MathInset::mode_type MathFontInset::currentMode() const
|
||||
{
|
||||
return key_->extra == "mathmode" ? MATH_MODE : TEXT_MODE;
|
||||
if (key_->extra == "mathmode")
|
||||
return MATH_MODE;
|
||||
if (key_->extra == "textmode")
|
||||
return TEXT_MODE;
|
||||
return UNDECIDED_MODE;
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,7 +60,7 @@ MathScriptInset * MathScriptInset::asScriptInset()
|
||||
bool MathScriptInset::idxFirst(idx_type & idx, pos_type & pos) const
|
||||
{
|
||||
idx = 2;
|
||||
pos = nuc().size();
|
||||
pos = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ void MathScriptInset::metrics(MathMetricsInfo & mi) const
|
||||
}
|
||||
dim_.a = dy1() + (hasUp() ? up().ascent() : 0);
|
||||
dim_.d = dy0() + (hasDown() ? down().descent() : 0);
|
||||
metricsMarkers();
|
||||
metricsMarkers2();
|
||||
}
|
||||
|
||||
|
||||
@ -217,7 +217,7 @@ void MathScriptInset::draw(MathPainterInfo & pi, int x, int y) const
|
||||
up().draw(pi, x + dx1(), y - dy1());
|
||||
if (hasDown())
|
||||
down().draw(pi, x + dx0(), y + dy0());
|
||||
drawMarkers(pi, x, y);
|
||||
drawMarkers2(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
@ -460,6 +460,7 @@ void MathScriptInset::octavize(OctaveStream & os) const
|
||||
|
||||
void MathScriptInset::infoize(std::ostream & os) const
|
||||
{
|
||||
os << "Scripts";
|
||||
if (limits_)
|
||||
os << (limits_ == 1 ? "Displayed limits" : "Inlined limits");
|
||||
os << (limits_ == 1 ? ", Displayed limits" : ", Inlined limits");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user