diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 3f1bb23596..a98fcfe095 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1459,15 +1459,12 @@ bool BufferView::dispatch(FuncRequest const & cmd) InsetIterator it = inset_iterator_begin(inset); InsetIterator const end = inset_iterator_end(inset); for (; it != end; ++it) { - if (!it->asInsetMath() + if (it->asInsetCollapsable() && (inset_code == NO_CODE || inset_code == it->lyxCode())) { Cursor tmpcur = cur; tmpcur.pushBackward(*it); - FuncStatus flag; - it->getStatus(tmpcur, fr, flag); - if (flag.enabled()) - it->dispatch(tmpcur, fr); + it->dispatch(tmpcur, fr); } } processUpdateFlags(Update::Force | Update::FitCursor); diff --git a/src/insets/InsetCommand.cpp b/src/insets/InsetCommand.cpp index 3e87b7fa1d..745cfeca8a 100644 --- a/src/insets/InsetCommand.cpp +++ b/src/insets/InsetCommand.cpp @@ -170,13 +170,6 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd, case LFUN_INSET_DIALOG_UPDATE: status.setEnabled(true); return true; - // We can't suppress entire LFUN_INSET_TOGGLE as long as - // LFUN_NEXT_INSET_TOGGLE is used for editation purposes. - case LFUN_INSET_TOGGLE: - status.setEnabled(cmd.argument() != "open" && - cmd.argument() != "close" && - cmd.argument() != "toggle"); - return true; default: return Inset::getStatus(cur, cmd, status); }