- case LFUN_ALL_INSETS_TOGGLE: {
- string action;
- string const name = split(to_utf8(cmd.argument()), action, ' ');
- InsetCode const inset_code = insetCode(name);
-
- FuncRequest fr(LFUN_INSET_TOGGLE, action);
-
- Inset & inset = cur.buffer()->inset();
- InsetIterator it = inset_iterator_begin(inset);
- InsetIterator const end = inset_iterator_end(inset);
- for (; it != end; ++it) {
- if (it->asInsetCollapsable()
- && (inset_code == NO_CODE
- || inset_code == it->lyxCode())) {
- Cursor tmpcur = cur;
- tmpcur.pushBackward(*it);
- it->dispatch(tmpcur, fr);
- }
- }
- dr.update(Update::Force | Update::FitCursor);
- break;
- }
-