]> git.lyx.org Git - features.git/commitdiff
Use isActive() instead of editable() in mathed.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sun, 22 Mar 2015 20:40:52 +0000 (21:40 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 23 Mar 2015 14:09:09 +0000 (15:09 +0100)
Fixes crash introduced in [17e435c4/lyxgit].

editable() is more related to Texted. It is false for closed collapsable insets
Eventually the two methods should be merged.

src/DocIterator.cpp

index 750479f8d4ea891baa8f2fe2c48c5ff9b943a94f..4dbd2614de2c0045e11cd77ad35ae9ea8b7eb154 100644 (file)
@@ -577,8 +577,9 @@ void DocIterator::sanitize()
                        fixIfBroken();
                        break;
                }
-               if (!inset->editable()) {
-                       LYXERR0("Inset found on cursor stack is not editable.");
+               if ((inset->inMathed() && !inset->isActive())
+                   || (!inset->inMathed() && !inset->editable())) {
+                       LYXERR0("Inset found on cursor stack is not active.");
                        fixIfBroken();
                        break;
                }