mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Fixup the fixup d0acc3e570
: use editable()/isActive()
While522516d9
was too strong and broke mathed,d0acc3e570
is too lenient and can accept insets (mathed/CommandInset, InsetInfo) that have a positive nargs() but are not editable (because they encapsulate something). Therefore the best solution for now is to use editable() in text and isActive() in mathed, until those two things are merged. Part of #10667.
This commit is contained in:
parent
b8e3615492
commit
13c3c1485b
@ -562,7 +562,9 @@ bool DocIterator::fixIfBroken()
|
||||
size_t n = slices_.size();
|
||||
for (; i != n; ++i) {
|
||||
CursorSlice & cs = slices_[i];
|
||||
if (&cs.inset() != inset || cs.nargs() == 0) {
|
||||
if (&cs.inset() != inset
|
||||
|| (cs.inset().inMathed() ? ! cs.inset().isActive()
|
||||
: ! cs.inset().editable())) {
|
||||
// the whole slice is wrong, chop off this as well
|
||||
--i;
|
||||
LYXERR(Debug::DEBUG, "fixIfBroken(): inset changed");
|
||||
|
Loading…
Reference in New Issue
Block a user