Opened 5 years ago

Closed 5 years 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:
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, 5 years 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 5 years ago by Janus (previous) (diff)

comment:2 by KapiX, 5 years ago

Resolution: invalid
Status: newclosed

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

Note: See TracTickets for help on using tickets.