* insetcollapsable.C (doDispatch): [LFUN_MOUSE_PRESS] reset selection

when mouse is pressed on the inset button (bug 3060).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16501 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2007-01-04 13:53:16 +00:00
parent 89ab910a4f
commit bce5521446

View File

@ -321,8 +321,12 @@ void InsetCollapsable::doDispatch(LCursor & cur, FuncRequest & cmd)
switch (cmd.action) {
case LFUN_MOUSE_PRESS:
if (cmd.button() == mouse_button::button1 && hitButton(cmd)) {
// reset selection if necessary (see bug 3060)
if (cur.selection())
cur.bv().cursor().clearSelection();
else
cur.noUpdate();
cur.dispatched();
cur.noUpdate();
break;
}
if (status() == Inlined)