It's still quite easy to crash the qt plugin while searching.  I am
pretty sure of the general causes:

a) the base-class find logic depends in strange ways on
leoQtTree.edit_widget() returning a valid headline widget.

b) Focus-out events invalidate (destroy) headline widgets.

This is a truly nasty situation.  It doesn't bite so much in the tk
gui because the tree keeps inactive edit widgets around.

My first thought was that calling killEditing() in more places would
make things better by causing leoQtTree.edit_widget to return None
more often.  But actually, this is backward. Forcing edit_widget to
always return None causes even more problems.

Time for a break.  Some new invention would be good.

Perhaps the base-class find logic can avoid using the edit widget
entirely, and just use p.headString().  This isn't trivial, as
p.headString() could change during finds, but it may be a way forward.

I'll take another crack at this tomorrow.  It may be that I'm missing
an important simplification.  I do hope so...

Edward

P.S.  It appears that leoQtTree.onHeadChanged is a true event handler,
which kinda surprised me.  It is, in fact, a target of events, as well
as being an override of a base-class method.  This may be involved in
the difficulties as well.

P.P.S.  The event filter can now optionally report focus in/out
events.  It might be possible to use focus-out events to affect the
headline logic, but that seems like more complication, not less.  The
more I think about this, the more I want the core to avoid knowing
about edit widgets entirely...

EKR
--~--~---------~--~----~------------~-------~--~----~
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