]> git.lyx.org Git - features.git/commitdiff
Fixup 522516d9 : editable() is unusable in mathed
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 20 Jun 2017 07:41:48 +0000 (09:41 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 20 Jun 2017 07:41:48 +0000 (09:41 +0200)
This is a relic from IU (Inset Unification): editable() is for text
insets and isActive() for mathed. This needs to be cleaned up.

Part of bug #10667.

src/DocIterator.cpp

index 3d9bd6892b79fc112f3913f4c837745ef7b8c890..fe1250ff335bf5d91330d12c79ca7bf5c60f241a 100644 (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 || !cs.inset().editable()) {
+               if (&cs.inset() != inset || cs.nargs() == 0) {
                        // the whole slice is wrong, chop off this as well
                        --i;
                        LYXERR(Debug::DEBUG, "fixIfBroken(): inset changed");