Alfredo Braunstein <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: | | > This is the second patch in the series. This one has known problems. I | > am pretty sure that this is due to (Row*)0 being used both for | > inserting at beginning of rowlist and as the end of the rowlist. | | - if (!row) { | - rowlist_.insert(rowlist_.begin(), tmprow); | - } else { | - rowlist_.insert(row->next(), tmprow); | - } | + if (rowit == rowlist_.end()) | + return rowlist_.insert(rowit, tmprow); | + else | + return rowlist_.insert(boost::next(rowit), tmprow);
This is insertRow right? The above is also not what I want. What I want is the function to look like this: RowList::iterator LyXText::insertRow(RowList::iterator rowit, Paragraph * par, pos_type pos) { Row * tmprow = new Row; tmprow->par(par); tmprow->pos(pos); return rowlist_.insert(rowit, tmprow); } And instead fixup all callers of insertRow. In particular I want insertRow(rowlist_.end(), par) to have meaning, and not be automatically transcribed to insertRow(rowlist_.begin(), par); | So the change of behaviour of insertRow is intended? (now insertRow(0,...) | will insert at the end, instead of the beginning). This is not really intended. | Note that you have losed | completely the ability to insert at the beginning (this may be the reason | it doesn't work). I don't understand this "half" move. The callers should be fixed... -- Lgb