On Wed, 27 Jul 2011 07:29:56 -0700 (PDT)
"Edward K. Ream" <[email protected]> wrote:

> > We can't have timers in event handlers.  
> 
> Let me explain what was an automatic, reflexive, response. There are
> three reasons why I don't want timers in event handlers.

Let's ignore, for now, the currently disabled timer code in
baseNativeTree.py which prevents single-click events firing until
you're sure it's not a double click event.

The timer which we both agree should not be needed is the one in
qtGui.py which pulls focus into a newly raised tab so that you're not
accidentally editing a headline in a concealed tab.

So remove that timer, in qtGui.py, the one with the 'ugly hack' comment.

Then, in a vanilla environment create this outline:

@url link
    .../leo/test/test.leo#

(except put the needed path in place of ...)

double clicking the node should open test.leo in a new tab.  Where's
the focus?  In the original, now concealed, tab editing the '@url link'
headline.

It may be that all that's needed is a call to c.endEditing() in the
right place, although I thought you'd tried that.

There's really two places this could be addressed, in the event
processing code so that a double click handler which preempts the
normal double click action can do so, or in the c.bringToFront() so
that it ensures the focus is somewhere in c, and not old_c, the one
that had focus befor c.bringToFront() was called.

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.

Reply via email to