]> git.lyx.org Git - lyx.git/commitdiff
getPar
authorAndré Pönitz <poenitz@gmx.net>
Thu, 14 Aug 2003 10:10:19 +0000 (10:10 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 14 Aug 2003 10:10:19 +0000 (10:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7538 a592a061-630c-0410-9148-cb99ea01b6c8

src/text2.C

index 1bf39dfadd1bf9686cd3579614e0fa39b7a7b68b..95cad09c2bfaca55f4380ff3b9f7172859408518 100644 (file)
@@ -263,13 +263,13 @@ void LyXText::removeRow(RowList::iterator rit)
 // remove all following rows of the paragraph of the specified row.
 void LyXText::removeParagraph(RowList::iterator rit)
 {
-       ParagraphList::iterator tmppit = getPar(rit);
-       ++rit;
+       ParagraphList::iterator pit = getPar(rit);
+       RowList::iterator end = endRow(pit);
 
-       while (rit != rows().end() && getPar(rit) == tmppit) {
-               RowList::iterator tmprit = boost::next(rit);
+       for (++rit; rit != end; ) {
+               RowList::iterator rit2 = boost::next(rit);
                removeRow(rit);
-               rit = tmprit;
+               rit = rit2;
        }
 }