Opened 19 years ago

Closed 19 years ago

Last modified 5 years ago

#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 fingolfin, 19 years ago

Owner: set to fingolfin
Summary: GUI: problem with blinking vertical barGUI: Caret not removed when switching tabs

comment:2 by salty-horse, 19 years ago

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?

comment:3 by eriktorbjorn, 19 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 fingolfin, 19 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 fingolfin, 19 years ago

Resolution: fixed
Status: newclosed

comment:6 by digitall, 5 years ago

Component: --Unset--GUI
Note: See TracTickets for help on using tickets.