On Nov 11, 6:38 am, Morgul <[email protected]> wrote:
> Hi all.
>
> I've found a problem with delete-editor command. It seems to crash
> Python (and so Leo closes, without saving the modifications or
> anything) when I try to close an editor for the third time during an
> execution of the editor.

The fix is on the trunk at rev 4787.  Here is the checkin log:

QQQQQ
The changes were straightforward:

- set w.leo_label to None when calling unpackWidget.

- Test for w.leo_label before using it.

Added a minitest.  To test by hand, add the following @button nodes:

    @button add-ed
    w = c.frame.body.addEditor()

    @button del-ed
    w = c.frame.body.deleteEditor()

Click away in any order...
QQQQQ

Note:  I inserted a minitest, not an always-enabled unit test because
of a timing problem:  when the commands are executed "quickly" the
label for the leftmost editor doesn't get properly deleted.  This
never happens when using the @buttons above, and anyway, the @buttons
are a more general test.

Edward

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