Make fixIfBroken() more robust

Chop slice when its inset is not editable.

Fixes bug #10667.
This commit is contained in:
Jean-Marc Lasgouttes 2017-06-15 11:49:49 +02:00
parent 9c92494e1a
commit 522516d99e

View File

@ -562,7 +562,7 @@ bool DocIterator::fixIfBroken()
size_t n = slices_.size();
for (; i != n; ++i) {
CursorSlice & cs = slices_[i];
if (&cs.inset() != inset) {
if (&cs.inset() != inset || !cs.inset().editable()) {
// the whole slice is wrong, chop off this as well
--i;
LYXERR(Debug::DEBUG, "fixIfBroken(): inset changed");