next try with Michael's patch

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8244 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-12-12 15:21:31 +00:00
parent 7da68795a5
commit 2384c36416

View File

@ -354,11 +354,13 @@ InsetCollapsable::priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &)
case LFUN_INSET_TOGGLE:
if (inset.text_.toggleInset())
return DispatchResult(true, true);
if (status_ == Open)
if (status_ == Open) {
setStatus(Inlined);
return DispatchResult(true, true);
setStatus(Collapsed);
return DispatchResult(false, FINISHED_RIGHT);
} else {
setStatus(Collapsed);
return DispatchResult(false, FINISHED_RIGHT);
}
default:
return inset.dispatch(adjustCommand(cmd));