when a tab is closed focus may go to a tab other than the visible one

Bug #823267 reported by tbnorth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
leo-editor
Fix Released
Medium
Edward K. Ream

Bug Description

When tabs are closed with the close tab 'X' on the tab focus should go to whichever tab becomes visible, but it doesn't, it goes to an arbitrary tab which may not be visible. If you then hit Alt-X expecting to cut the highlighted node in the visible tab, you cut a node you can't see in a different commander.

Changed in leo-editor:
assignee: nobody → Edward K. Ream (edreamleo)
importance: Undecided → Medium
Changed in leo-editor:
milestone: none → 4.10-b1
Revision history for this message
Edward K. Ream (edreamleo) wrote :

> When tabs are closed with the close tab 'X' on the tab focus should go to whichever tab becomes visible, but it doesn't, it goes to an arbitrary tab which may not be visible. If you then hit Alt-X expecting to cut the highlighted node in the visible tab, you cut a node you can't see in a different commander.

This analysis is exactly correct. Many thanks for the deep insight.

The fix, I think, is on the trunk at rev 5067. I say "I think" because this involves always-difficult event handlers. From the checkin log:

QQQ
- Refactored part of g.app.closeLeoWindow into g.app.selectLeoWindow.
- Added the new_c argument to g.app.closeLeoWindow and c.close.
- Changed several event handlers in TabbedFrameFactor so that they call g.app.selectLeoWindow as appropriate.
QQQ

Such code is difficult because there are several "directions" of program flow that must all work. (I believe they do work, but I wouldn't bet my life on it):

1. From Gui to events. Example, clicking the X box.

2. From commands to events. Example, executing the close-window command.

Changed in leo-editor:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.