From c2f785bdcc769f0c3ab0de186291c810f3f0875d Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sun, 22 Mar 2015 21:40:52 +0100 Subject: [PATCH] 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. --- src/DocIterator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.39.2