commit a6bc4a2a34a220f4ffd60743d3c5be9cbb9bf927
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Sun Mar 22 21:40:52 2015 +0100
Use isActive() instead of editable() in mathed.
Fixes crash introduced in [d5eeabcf/lyxgit].
editable() is more related to Texted. It is false for closed collapsable
insets
Eventually the two methods should be merged.
diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp
index e574115..db52912 100644
--- a/src/DocIterator.cpp
+++ b/src/DocIterator.cpp
@@ -555,8 +555,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;
}