I've just checked in a fix.
Two fixes actually, and one of them I'd have thought we'd hit by now. LyXText::deleteRow() forgot to check refresh_row. I set this to: refresh_row = row_prev ? row_prev : row->next(); since I figure there must be some reason why refresh_row was set and it would be unlikely that we'd delete the first row of a multirow paragraph. Anyway the interesting part is in LyXText::drawInset() where we got partly screwed because p.row just got deleted so I changed it to a valid row -- what else could I do? Should I also try to fix the p.x and p.y values? Seems to work without doing that. If someone more familiar with rebreaking could take a look and decide whether I should/could set need_break_row differently if p.row was just removed: if (prev && prev->par() == p.row->par()) { breakAgainOneRow(p.bv, prev); // breakAgainOneRow() may have removed p.row // What about the x and y coordinates? par & pos ok. if (prev->next() != p.row) { p.row = prev; } // If there's only one row (after p.row was deleted) // prev->next() == 0 and no breaking is required. // Otherwise, check the new next row. ==> need_break_row = prev->next(); } else { need_break_row = p.row; } If p.row was deleted it must have been the last row of a paragraph so we could set need_break_row = 0 couldn't we? As in: if (prev && prev->par() == p.row->par()) { breakAgainOneRow(p.bv, prev); // breakAgainOneRow() may have removed p.row // What about the x and y coordinates? par & pos ok. if (prev->next() != p.row) { p.row = prev; need_break_row = 0; } else { need_break_row = p.row; } } else { need_break_row = p.row; } Allan. (ARRae)