Jean-Marc Lasgouttes wrote:
>>>>>> "Juergen" == Juergen Spitzmueller
>>>>>> <[EMAIL PROTECTED]> writes:
>
> Juergen> Indeed, it is still possible to trigger the assert. I can do
> Juergen> this with double and triple clicking. Probably bug 1797; I
> Juergen> guess we need to handle LFUN_MOUSE_{DOUBLE|TRIPLE} in the
> Juergen> inset's (or insetcollapsable's) dispatch somehow.
>
> I guess that insetcollapsable should handle double/triple click only
> if it is open and the click is in the insettext. I have not had time
> to look at this, but it should be easy enough to do.
I agree. The attached works for me. Please test. If nobody sees problems
I'll commit that.
Georg
Index: src/insets/insetcollapsable.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetcollapsable.C,v
retrieving revision 1.269
diff -u -p -r1.269 insetcollapsable.C
--- src/insets/insetcollapsable.C 22 Apr 2005 08:57:21 -0000 1.269
+++ src/insets/insetcollapsable.C 22 Apr 2005 13:56:50 -0000
@@ -341,6 +341,15 @@ void InsetCollapsable::doDispatch(LCurso
}
break;
+ case LFUN_MOUSE_DOUBLE:
+ case LFUN_MOUSE_TRIPLE:
+ if (status_ == Inlined ||
+ status_ == Open && !hitButton(cmd))
+ InsetText::doDispatch(cur, cmd);
+ else
+ cur.undispatched();
+ break;
+
case LFUN_INSET_TOGGLE:
if (cmd.argument == "open")
setStatus(Open);