From: Jean-Marc Lasgouttes Date: Sun, 22 Mar 2015 20:40:52 +0000 (+0100) Subject: Use isActive() instead of editable() in mathed. X-Git-Tag: 2.2.0alpha1~1117 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c2f785bd;p=features.git Use isActive() instead of editable() in mathed. 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. --- diff --git a/src/DocIterator.cpp b/src/DocIterator.cpp index 750479f8d4..4dbd2614de 100644 --- a/src/DocIterator.cpp +++ b/src/DocIterator.cpp @@ -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; }