John Levon wrote: > is the cause of the fact that you cannot right-click on a collapsed > minipage inside a float and get the dialog any more. Alfredo, could you > please have a quick look ?
Can you try this? I've put inside #if 0 the code that make local the mouseclick position before calling edit or localDispatch on a !isHiglyEditable() child inset, and added a simple localdispatch for insetbuttons that call edit(). This works because simple insets (that do not have an overloaded localDispatch()) do not use the cursor position received on edit(), AFAIK. I think that we should switch to _always_ pass the local coordinates to insets in the future, but at least it's more uniform with this patch. Regards, Alfredo
Index: insets/insettext.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insettext.C,v retrieving revision 1.366 diff -u -p -u -r1.366 insettext.C --- insets/insettext.C 2003/03/29 23:11:20 1.366 +++ insets/insettext.C 2003/03/30 00:23:54 @@ -1014,6 +1014,7 @@ bool InsetText::lfunMouseRelease(FuncReq Inset * inset = getLyXText(bv)->checkInsetHit(tmp_x, tmp_y); bool ret = false; if (inset) { +#if 0 if (isHighlyEditableInset(inset)) ret = inset->localDispatch(cmd1); else { @@ -1021,12 +1022,13 @@ bool InsetText::lfunMouseRelease(FuncReq inset_y = ciy(bv) + drawTextYOffset; cmd1.x = cmd.x - inset_x; cmd1.y = cmd.x - inset_y; -// note that we should do ret = inset->localDispatch(cmd1) -// and fix this instead (Alfredo); - ret = true; inset->edit(bv, cmd1.x, cmd1.y, cmd.button()); + ret = true; } +#endif + ret = inset->localDispatch(cmd1); updateLocal(bv, CURSOR_PAR, false); + } return ret; } Index: insets/insetbutton.C =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetbutton.C,v retrieving revision 1.24 diff -u -p -u -r1.24 insetbutton.C --- insets/insetbutton.C 2003/03/17 01:34:34 1.24 +++ insets/insetbutton.C 2003/03/30 00:23:55 @@ -16,6 +16,7 @@ #include "insetbutton.h" #include "debug.h" #include "BufferView.h" +#include "funcrequest.h" #include "frontends/LyXView.h" #include "frontends/Painter.h" #include "support/LAssert.h" @@ -126,4 +127,12 @@ void InsetButton::cache(BufferView * bv) BufferView * InsetButton::view() const { return view_.lock().get(); +} + + +dispatch_result InsetButton::localDispatch(FuncRequest const & cmd) +{ + FuncRequest cmd1(cmd); + edit(cmd1.view(), cmd1.x, cmd1.y, cmd1.button()); + return DISPATCHED; } Index: insets/insetbutton.h =================================================================== RCS file: /cvs/lyx/lyx-devel/src/insets/insetbutton.h,v retrieving revision 1.15 diff -u -p -u -r1.15 insetbutton.h --- insets/insetbutton.h 2003/03/17 01:34:34 1.15 +++ insets/insetbutton.h 2003/03/30 00:23:55 @@ -31,6 +31,8 @@ public: int width(BufferView *, LyXFont const &) const; /// void draw(BufferView *, LyXFont const &, int, float &) const; + /// + dispatch_result localDispatch(FuncRequest const & cmd); protected: ///