]> git.lyx.org Git - features.git/commitdiff
DocIterator::innerText(): reuse innerTextSlice()
authorAbdelrazak Younes <younes@lyx.org>
Sun, 9 Aug 2009 15:47:50 +0000 (15:47 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Sun, 9 Aug 2009 15:47:50 +0000 (15:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30944 a592a061-630c-0410-9148-cb99ea01b6c8

src/DocIterator.cpp

index 63e9e7be9968518096507a343eee3dd4e6d68c6e..ec1f6b89cd1fcd2bf3788797221005732935f320 100644 (file)
@@ -249,12 +249,7 @@ MathData & DocIterator::cell() const
 Text * DocIterator::innerText() const
 {
        LASSERT(!empty(), /**/);
-       // go up until first non-0 text is hit
-       // (innermost text is 0 in mathed)
-       for (int i = depth() - 1; i >= 0; --i)
-               if (slices_[i].text())
-                       return slices_[i].text();
-       return 0;
+       return innerTextSlice().text();
 }