when a tab is closed focus may go to a tab other than the visible one
Bug #823267 reported by
tbnorth
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 |
To post a comment you must log in.
> 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 indow into g.app.selectLeo Window. indow and c.close. Window as appropriate.
- Refactored part of g.app.closeLeoW
- Added the new_c argument to g.app.closeLeoW
- Changed several event handlers in TabbedFrameFactor so that they call g.app.selectLeo
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.