Alfredo Braunstein wrote: > Angus Leeming wrote: > >> What we expect is that we're left with >> [Branch:red][Branch:yellow] >> and indeed we are. Further, if we were to open the yellow branch >> inset, we'd find that the green one was still open. Perfecto. >> However, note the position of the cursor... > > This seems to be that the cursor doesn't exit the inset before it is > closed. I think you should (in insetcollapsable) mutate the FuncRequest to > LFUN_FINISHED_RIGHT (as in MOUSE_RELEASE), to make the parent LyXText > catch the request and change the cursor position (and more importantly > take posession of the cursor). But I may be talking nonsense here...
Indeed I was, as you are dispatching from LyXFunc directly instead of dispatching through the cursor, then the above mechanism doesn't work. Alfredo