On Tue, 26 Jul 2011 15:17:11 -0700 (PDT) "Edward K. Ream" <[email protected]> wrote:
> > > On Jul 26, 1:31 pm, "Edward K. Ream" <[email protected]> wrote: > > On Tue, Jul 26, 2011 at 1:24 PM, Terry Brown <[email protected]> > > wrote: > > > The timer shouldn't be needed - a 'doubleClick1' hook which returns > > > non-None should stop the headline going into edit mode. If you can > > > make that be the case, all is well. > > Done at rev 4437. As you say, the timer code can be deleted: at > present it is simply disabled. > > I'm pretty sure that Qt itself was causing the node to be edited. The > workaround in the present code is to call c.endEditing if > p.h.startswith('@ujl'). With this code in place you can see the node > briefly entering edit mode before the call to c.endEditing. > > This could be called an "infelicity" in Qt: there is no event passed > to the signal-handler, so there is no event for which to call > event.ignore(). > > Anyway, I think the present code does what you want. Let me know if > not. I'm afraid confusion reigns. I had recently injected *two* timers into event handling (you're starting to wonder why you gave me commit rights :-). The one in qtGui.py under the comment "# ugly hack to get focus from the commander which called this" is still there, and if it's disabled the problem of the buried commander being in edit mode still exists in 4437. I think your "briefly entering edit mode" above is the bug before the timer in qtGui.py wrenches focus away to the second commander. That's the timer that can be eliminated if we can work out how to stop the node going into edit mode when a doubleclick is made. I think the problem is that the doHook processing is not the only processing which occurs. The other timer, the one currently disabled, and in baseNativeTree.py, is used to prevent a singleclick event firing on the first click in a double click event. I can't see how a timer can be avoided in that case, but I like the effect it has, so I'd like to see the code stay, with a @setting keeping it off by default. Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
