Fix bug #6659: InsetInfo context menu disabled unless cursor immediately in front.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34215 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-04-18 23:35:59 +00:00
parent 9f17376f5c
commit ce4d5f22f8

View File

@ -217,7 +217,7 @@ bool InsetInfo::getStatus(Cursor & cur, FuncRequest const & cmd,
flag.setEnabled(true);
return true;
}
//fall back
//fall through
default:
return false;
@ -237,6 +237,21 @@ void InsetInfo::doDispatch(Cursor & cur, FuncRequest & cmd)
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:
break;
}