#1961 closed defect (fixed)
GUI: Caret not removed when switching tabs
Reported by: | SF/richiefs | Owned by: | fingolfin |
---|---|---|---|
Priority: | normal | Component: | GUI |
Version: | Keywords: | ||
Cc: | Game: |
Description
in the gui, when you edit a game properties, click in the name field, there you can see the blinking vertical bar. if you click on the gfx tab, the blinking bar is still shown.
i use cvs version of the 17/03/05 on winxp
Ticket imported from: #1166231. Ticket imported from: bugs/1961.
Change History (6)
comment:1 by , 20 years ago
Owner: | set to |
---|---|
Summary: | GUI: problem with blinking vertical bar → GUI: Caret not removed when switching tabs |
comment:2 by , 20 years ago
comment:3 by , 20 years ago
The same thing happens, though less noticeably, if you click in the name field and then click on any other widget on the same tab: the name field is still the focused widget, since only only text field and list widgets want the focus.
So one possible solution would be to simply let TabWidget's wantsFocus() method return true, though that's a bit hackish I guess...
comment:4 by , 20 years ago
Fixed in CVS by releasing the focus when the active tab is switched.
salty-horse, releaseFocus() by default just calls its counterpart in the _boss of any given GuiObject, so usually it'll end up at the top of the responsibility chain, which in this case is the active dialog.
Of course this solution is not perfect; e.g. one might want to restore the focus when switching back to the tab we just left. But I'll leave that as an exercise for the interested ;-)
comment:5 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 6 years ago
Component: | --Unset-- → GUI |
---|
TabWidget.h has a strange comment: use Dialog::releaseFocus() when changing to another tab
I don't see any inheritence from Dialogs, so how can it be used?