Abdelrazak Younes wrote:
> > Another in the same league is when you click in a cross-reference i.e.
> > the dialog opens but the cursor jumps automatically to its previous
> > location. IMHO, it should be repositioned just before or after the
> > button.
>
> Same thing when you right-click on a table or a graphic.

And when you right click on any button inset.

Patch attached. Please test.

Jürgen
Index: src/insets/insetcollapsable.C
===================================================================
--- src/insets/insetcollapsable.C	(Revision 13680)
+++ src/insets/insetcollapsable.C	(Arbeitskopie)
@@ -289,7 +289,7 @@ void InsetCollapsable::doDispatch(LCurso
 		else if (status() == Open && !hitButton(cmd))
 			InsetText::doDispatch(cur, cmd);
 		else
-			cur.noUpdate();
+			cur.undispatched();
 		break;
 
 	case LFUN_MOUSE_MOTION:
Index: src/insets/insettabular.C
===================================================================
--- src/insets/insettabular.C	(Revision 13680)
+++ src/insets/insettabular.C	(Arbeitskopie)
@@ -475,7 +475,7 @@ void InsetTabular::doDispatch(LCursor & 
 
 		// we'll pop up the table dialog on release
 		if (cmd.button() == mouse_button::button3)
-			break;
+			cur.undispatched();
 		break;
 
 	case LFUN_MOUSE_MOTION:
Index: src/insets/insetref.C
===================================================================
--- src/insets/insetref.C	(Revision 13680)
+++ src/insets/insetref.C	(Arbeitskopie)
@@ -49,8 +49,10 @@ void InsetRef::doDispatch(LCursor & cur,
 		// Eventually trigger dialog with button 3 not 1
 		if (cmd.button() == mouse_button::button3)
 			cur.bv().owner()->dispatch(FuncRequest(LFUN_LABEL_GOTO, getContents()));
-		else
+		else {
 			InsetCommandMailer("ref", *this).showDialog(&cur.bv());
+			cur.undispatched();
+		}
 		return;
 
 	case LFUN_MOUSE_RELEASE:
Index: src/text3.C
===================================================================
--- src/text3.C	(Revision 13680)
+++ src/text3.C	(Arbeitskopie)
@@ -1026,10 +1026,8 @@ void LyXText::dispatch(LCursor & cur, Fu
 	// Single-click on work area
 	case LFUN_MOUSE_PRESS: {
 		// Right click on a footnote flag opens float menu
-		if (cmd.button() == mouse_button::button3) {
+		if (cmd.button() == mouse_button::button3)
 			cur.clearSelection();
-			break;
-		}
 
 		// Middle button press pastes if we have a selection
 		// We do this here as if the selection was inside an inset

Reply via email to