- // FuncRequestually trigger dialog with button 3 not 1
- if (button == mouse_button::button3)
- bv->owner()->dispatch(FuncRequest(LFUN_REF_GOTO, getContents()));
- else if (button == mouse_button::button1) {
- InsetCommandMailer mailer("ref", *this);
- mailer.showDialog(bv);
+ switch (cmd.action) {
+ case LFUN_MOUSE_PRESS:
+ // Eventually trigger dialog with button 3 not 1
+ if (cmd.button() == mouse_button::button3)
+ cur.bv().owner()->dispatch(FuncRequest(LFUN_REF_GOTO, getContents()));
+ else
+ InsetCommandMailer("ref", *this).showDialog(&cur.bv());
+ return;
+
+ case LFUN_MOUSE_RELEASE:
+ return;
+
+ default:
+ return InsetCommand::priv_dispatch(cur, cmd);