- //lyxerr << "InsetCollapsable::localDispatch: "
- // << cmd.action << " '" << cmd.argument << "'\n";
- BufferView * bv = cmd.view();
- switch (cmd.action) {
- case LFUN_INSET_EDIT: {
- if (!cmd.argument.empty()) {
- UpdatableInset::localDispatch(cmd);
- if (collapsed_) {
- lyxerr << "branch collapsed_" << endl;
- collapsed_ = false;
- if (bv->lockInset(this)) {
- bv->updateInset(this);
- bv->buffer()->markDirty();
- inset.localDispatch(cmd);
- first_after_edit = true;
- }
- } else {
- lyxerr << "branch not collapsed_" << endl;
- if (bv->lockInset(this))
- inset.localDispatch(cmd);
- }
- return DISPATCHED;
- }