Opened 8 months ago

Closed 8 months ago

#14857 closed bug (invalid)

BListView invokes items on first click

Reported by: KapiX Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

BeBook states it should happen on second click: https://www.haiku-os.org/legacy-docs/bebook/BListView.html#BListView_MouseDown

The code tries to do that but for some reason fails: https://git.haiku-os.org/haiku/tree/src/kits/interface/ListView.cpp#n556

Can be reproduced with Koder's bookmarks window (built from [1]).

It immediately goes to clicked bookmark, instead of waiting for a second click.

[1] https://github.com/KapiX/Koder/commit/84d237657b0ca7bffa651105460c4572521be34f

Change History (2)

comment:1 by Janus, 8 months ago

I think this is the correct behavior. See

Invoke()

[...]This function is called to send both the selection message and the invocation message. [...]

from https://www.haiku-os.org/legacy-docs/bebook/BListView.html#BListView_Invoke

you should use SetInvocationMessage() and SetSelectionMessage().

Last edited 8 months ago by Janus (previous) (diff)

comment:2 by KapiX, 8 months ago

Resolution: invalid
Status: newclosed

Right. Turns out I need to check InvokeKind in my implementation.

Note: See TracTickets for help on using tickets.