From: Martin Vermeer Date: Wed, 10 Sep 2003 14:06:49 +0000 (+0000) Subject: Simplify by using adjustCommand, and fix bug in the process X-Git-Tag: 1.6.10~16113 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=22aa494ebabea8fada234c91018a4c11a4dadae6;p=features.git Simplify by using adjustCommand, and fix bug in the process git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7730 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 1e591c440f..7db0575a15 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2003-09-10 Martin Vermeer + + * insetcollapsable.C: Simplify by using adjustCommand, and fix bug + in the process + 2003-09-09 Lars Gullik Bjønnes * several files: change Assert to BOOST_ASSERT diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index becba55719..68fe887ab0 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -319,15 +319,14 @@ InsetOld::RESULT InsetCollapsable::localDispatch(FuncRequest const & cmd) bv->buffer()->markDirty(); inset.localDispatch(cmd); } else { - FuncRequest cmd1 = cmd; if (!bv->lockInset(this)) return DISPATCHED; if (cmd.y <= button_dim.y2) { + FuncRequest cmd1 = cmd; cmd1.y = 0; - } else { - cmd1.y = ascent() + cmd.y - (height_collapsed() + inset.ascent()); - } - inset.localDispatch(cmd); + inset.localDispatch(cmd1); + } else + inset.localDispatch(adjustCommand(cmd)); } return DISPATCHED; }