Opened 4 years ago

Closed 4 years ago

Last modified 22 months ago

#3574 closed defect (fixed)

[PATCH] GUI Ordered list needs better doubleclick registration

Reported by: elexis Owned by: elexis
Priority: Should Have Milestone: Alpha 19
Component: UI & Simulation Keywords:
Cc: Patch:

Description

Since r17150 / #3557, doubleclicking is actually used in the GUI.

In both cases it is a list element, which stupidly inherits the doubleclick logic from the placeholder / parent class CGUI.cpp. This means that whenever one doubleclicks anywhere inside the rectangle of the list, a doubleclick will be registered.

But this is not the expected behavior:

Reproduce (1): Select one item and then a different one within SELECT_DBLCLICK_RATE = 0.5 seconds. The second item will be doubleclicked instead of single-clicked, which was not intended as one didn't doubleclick that specific list item.

Reproduce (2): Doubleclick on the column header. It will reorder the list and then execute the doubleclick function.


As we don't want to hack a workaround twice in JS, we should rather make a specific logic for the COList to register doubleclicks for list items.

Attachments (1)

t3574_list_item_doubleclicks_v1.patch (4.7 KB) - added by elexis 4 years ago.

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by elexis

comment:1 Changed 4 years ago by elexis

Keywords: patch review added
Milestone: BacklogAlpha 20
Summary: GUI Ordered list needs better doubleclick registration[PATCH] GUI Ordered list needs better doubleclick registration

comment:2 Changed 4 years ago by elexis

Milestone: Alpha 20Alpha 19

Can be pushed back to A20 of course, but it would be really good to fix this in a19, as you start replays you didn't intend to start if you select multiple replays to see their details and join games which you didn't intend to join when trying to figure out who is playing on which server.

comment:3 Changed 4 years ago by stanislas69

Does double click behave the same on all platforms ?

comment:4 Changed 4 years ago by stanislas69

Owner: set to elexis

comment:5 Changed 4 years ago by wraitii

Resolution: fixed
Status: newclosed

In 17274:

Handle double-clicks on list elements better. Patch by elexis.

Fixes #3574

comment:6 Changed 4 years ago by wraitii

Keywords: patch review removed

After looking at the GUI, I couldn't find a better way to fix this as elements of a list aren't actually GUI elements. Slightly annoying and I guess should be fixed someday but were that the only problem with the GUI...

comment:7 Changed 22 months ago by elexis

In 20550:

Enable and disable mods more comfortably using the doubleclick event, refs #3574 / rP17274.
Filter mods while typing, refs D860 / rP20091.

Note: See TracTickets for help on using tickets.