mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 11:52:25 +00:00
Fixup the fixup 4499680b
: use editable()/isActive()
While1c07c0dc
was too strong and broke mathed,4499680b
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. (cherry picked from commit13c3c1485b
)
This commit is contained in:
parent
68bc505029
commit
869174e295
@ -535,7 +535,9 @@ bool DocIterator::fixIfBroken()
|
|||||||
size_t n = slices_.size();
|
size_t n = slices_.size();
|
||||||
for (; i != n; ++i) {
|
for (; i != n; ++i) {
|
||||||
CursorSlice & cs = slices_[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
|
// the whole slice is wrong, chop off this as well
|
||||||
--i;
|
--i;
|
||||||
LYXERR(Debug::DEBUG, "fixIfBroken(): inset changed");
|
LYXERR(Debug::DEBUG, "fixIfBroken(): inset changed");
|
||||||
|
Loading…
Reference in New Issue
Block a user