]> git.lyx.org Git - lyx.git/commitdiff
Small code cleanup
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 9 Oct 2015 13:48:59 +0000 (15:48 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 9 Oct 2015 13:48:59 +0000 (15:48 +0200)
src/Cursor.cpp

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