Dekel Tsur <[EMAIL PROTECTED]> writes:
| > That is a bug. Kaywan posted a fix for that yesterday.
| >
Sorry about that.
|
| The fix was posted by me. However, it was incorrect.
| Attached is a correct patch.
|
| --3V7upXqbjpZ4EhLz
| Content-Type: text/plain; charset=us-ascii
| Content-Disposition: attachment; filename=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);
| }
Why not just make it sort in the right order instead of using a
reverse iterator?
Lgb