no listbox event on double click

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

no listbox event on double click

Post by xDan »

well, something like that anyway.

If I do a double click, and do the first click on one list box item, and the *second* click of that double click lands on a different list box item, then no EGET_LISTBOX_CHANGED event is generated (but visually, the selection changes, so an event should be generated).

This is with 1.6. but I did not see any fix in the changelog for 1.6.1.

To test you can handle the event in the user interface example

Code: Select all

			case gui::EGET_LISTBOX_CHANGED:
				printf("%i listbox\n",rand());
				break;
then create some items in the list box by creating new windows. then double click around to test. If you do two clicks slowly it works as it should, this is peculiar to a fast double click.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Thanks. I knew something was still strange because I also have to check for EGET_LISTBOX_SELECTED_AGAIN additionally to EGET_LISTBOX_CHANGED in a listbox because it didn't work otherwise, but had not figured out yet when it happens :-)
I'll put it on my todo, but would be nice if you could also add a bugtracker entry for that.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

OK, I figured out what's currently happening. EGET_LISTBOX_SELECTED_AGAIN is only send when the item is clicked within 500ms or by "enter" or "space". Otherwise you get EGET_LISTBOX_CHANGED. It look like it was written that way for the file-open dialog where this behavior is/was needed.

Certainly it should be corrected, but I don't find time currently to rewrite the file-open dialog, so instead I just documented the real behavior for now. Better solution will have to wait until 1.7.1 or 1.8.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply