Move cursor in front of InsetMathSpace before opening the dialog (#7749)

This commit is contained in:
Guillaume Munch 2017-02-18 23:03:53 +01:00
parent 71623b88b2
commit 86d9abeea7

View File

@ -305,8 +305,6 @@ bool InsetMathSpace::getStatus(Cursor & cur, FuncRequest const & cmd,
case LFUN_INSET_MODIFY:
case LFUN_INSET_DIALOG_UPDATE:
case LFUN_MOUSE_RELEASE:
case LFUN_MOUSE_PRESS:
case LFUN_MOUSE_MOTION:
status.setEnabled(true);
return true;
default:
@ -332,18 +330,13 @@ void InsetMathSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
break;
case LFUN_MOUSE_RELEASE:
if (cmd.button() == mouse_button::button1) {
if (cmd.button() == mouse_button::button1 && !cur.selection()) {
showInsetDialog(&cur.bv());
break;
}
cur.undispatched();
break;
case LFUN_MOUSE_PRESS:
case LFUN_MOUSE_MOTION:
// eat other mouse commands
break;
default:
InsetMath::doDispatch(cur, cmd);
break;