]> git.lyx.org Git - features.git/commitdiff
Fixup 1c07c0dc: 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:52:21 +0000 (09:52 +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.

(cherry picked from commit d0acc3e570447b293169b8bdd5ac67aaade189e0)

src/DocIterator.cpp

index a3d81caadb81cab504bd195eaf8b38c53955d88c..80e67ee2cf8e6ea649a386484f7a2d2b847546ed 100644 (file)
@@ -535,7 +535,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");