Am Montag, 4. April 2005 18:35 schrieb Angus Leeming: > Hmmmm, so the report is actually: > "right clicking in the document should move the cursor in the same > way as left clicking in the document." > > The trouble is that right and left clicking mean very different things. > What do other editors do? > > emacs: write clicking moves the cursor to the position of the click and > selects all text from the old cursor position (let's call it position 1) > to the new one. Multiple right clicks change the selected text, but always > use the original (position 1) as the starting point. > > kwrite: right clicking does not move the cursor at all. Instead it opens > up a menu at the position of the mouse.
openoffice: does not move the cursor. It opens a context menu. If I change something in the context menu (e. g. font size) it does not apply to any table cell, but changes the current global setting. If I change something table related, it applies to the cell where the cursor is, not the one where I right clicked. After thinking again I am not sure anymore what to do. The attached patch implements the changed behaviour. It works well except when my LFUN_INSET_APPLY patch is applied, but that is another problem. Georg
Index: src/insets/insettabular.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insettabular.C,v retrieving revision 1.460 diff -u -p -r1.460 insettabular.C --- src/insets/insettabular.C 21 Mar 2005 18:21:13 -0000 1.460 +++ src/insets/insettabular.C 4 Apr 2005 17:48:03 -0000 @@ -438,7 +438,12 @@ void InsetTabular::doDispatch(LCursor & 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) { + // we'll pop up the table dialog on release of button3. + // We need to set the cursor also for button3, because + // the table dialog acts on the cell containing the + // cursor. cur.selection() = false; setCursorFromCoordinates(cur, cmd.x, cmd.y); cur.resetAnchor(); @@ -453,10 +458,6 @@ void InsetTabular::doDispatch(LCursor & cell(cur.idx())->dispatch(cur, cmd); break; } - - // we'll pop up the table dialog on release - if (cmd.button() == mouse_button::button3) - break; break; case LFUN_MOUSE_MOTION: