* src/insets/insettabular.C (doDispatch): set cursor properly on mouse

(button 3) press. Fixes crash.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14237 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2006-06-26 18:16:38 +00:00
parent 2deec8a96a
commit 913a4129aa

View File

@ -469,7 +469,8 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
case LFUN_MOUSE_PRESS:
//lyxerr << "# InsetTabular::MousePress\n" << cur.bv().cursor() << endl;
if (cmd.button() == mouse_button::button1) {
if (cmd.button() == mouse_button::button1
|| cmd.button() == mouse_button::button3) {
cur.selection() = false;
setCursorFromCoordinates(cur, cmd.x, cmd.y);
cur.resetAnchor();
@ -480,12 +481,7 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
if (cmd.button() == mouse_button::button2) {
cmd = FuncRequest(LFUN_PRIMARY_SELECTION_PASTE, "paragraph");
doDispatch(cur, cmd);
break;
}
if (cmd.button() == mouse_button::button3)
bvcur.setCursor(cur);
break;
case LFUN_MOUSE_MOTION: