On Fri, Mar 24, 2000 at 06:07:08PM +0100, Lars Gullik Bj&resh;nnes wrote:
> "Claus Hentschel" <[EMAIL PROTECTED]> writes:
> 
> | If there is an error - and there still are a lot of in my files which did
> | not come up in fix1 - than in fix2 near the error boxes there are some
> | characters removed from what I have written before. So fixing one
> | error and
> 
> That is a bug. Kaywan posted a fix for that yesterday.
> 

The fix was posted by me. However, it was incorrect.
Attached is a correct patch.
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.255
diff -u -p -r1.255 ChangeLog
--- ChangeLog   2000/03/24 14:08:18     1.255
+++ ChangeLog   2000/03/25 09:30:58
@@ -1,3 +1,8 @@
+2000-03-25  Dekel Tsur <[EMAIL PROTECTED]>
+
+        * src/paragraph.C (AutoDeleteInsets) Fixed a bug (wrong positions
+        were erased)
+
 2000-03-22  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
        * config/gettext.m4 (AM_WITH_NLS): fix a gettext bug where -lintl
Index: src/paragraph.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.49
diff -u -p -r1.49 paragraph.C
--- src/paragraph.C     2000/03/17 10:14:45     1.49
+++ src/paragraph.C     2000/03/25 09:31:05
@@ -1882,9 +1882,10 @@ int LyXParagraph::AutoDeleteInsets()
                        ++i;
                }
        }
-       for (vector<size_type>::const_iterator cit = tmpvec.begin();
-            cit != tmpvec.end(); ++cit) {
-               Erase((*cit));
+       sort(tmpvec.begin(),tmpvec.end());
+       for (vector<size_type>::reverse_iterator it = tmpvec.rbegin();
+            it != tmpvec.rend(); ++it) {
+               Erase(*it);
        }
        return i;
 }

Reply via email to