Better(?) fix for bug #6659: InsetInfo context menu disabled unless cursor immediately in front.

(see r34215 for the previous fix.)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34216 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-04-18 23:47:11 +00:00
parent ce4d5f22f8
commit ec862d10da

View File

@ -227,32 +227,13 @@ bool InsetInfo::getStatus(Cursor & cur, FuncRequest const & cmd,
void InsetInfo::doDispatch(Cursor & cur, FuncRequest & cmd)
{
// allow selection, copy but not cut, delete etc
switch (cmd.action()) {
case LFUN_INSET_SETTINGS:
InsetCollapsable::doDispatch(cur, cmd);
break;
case LFUN_INSET_MODIFY:
setInfo(to_utf8(cmd.argument()));
break;
case LFUN_MOUSE_PRESS:
switch (cmd.button()) {
case mouse_button::button1:
case mouse_button::button3:
cur.undispatched();
break;
case mouse_button::none:
case mouse_button::button2:
case mouse_button::button4:
case mouse_button::button5:
// Nothing to do.
cur.noUpdate();
break;
}
default:
InsetCollapsable::doDispatch(cur, cmd);
break;
}
}