Small code cleanup

This commit is contained in:
Jean-Marc Lasgouttes 2015-10-09 15:48:59 +02:00
parent e24f782eeb
commit eb9250ff2c

View File

@ -957,9 +957,8 @@ bool Cursor::posVisToNewRow(bool movingLeft)
// Inside a table, determining whether to move to the next or // Inside a table, determining whether to move to the next or
// previous row should be done based on the table's direction. // previous row should be done based on the table's direction.
int s = depth() - 1; if (inset().asInsetTabular()) {
if (s >= 1 && (*this)[s].inset().asInsetTabular()) { par_is_LTR = !inset().asInsetTabular()->isRightToLeft(*this);
par_is_LTR = !(*this)[s].inset().asInsetTabular()->isRightToLeft(*this);
LYXERR(Debug::RTL, "Inside table! par_is_LTR=" << (par_is_LTR ? 1 : 0)); LYXERR(Debug::RTL, "Inside table! par_is_LTR=" << (par_is_LTR ? 1 : 0));
} }