Godot Version
v4.2.1.stable.official [b09f793f5], linux
Question
I’m confused by the item_selected
and multi_selected
signals when an ItemList
is in multi-select mode.
ItemList
can emit two signals to describe items being selected, item_selected
and multi_selected
. item_selected
just passes the index of the selected item, and is only used when the selection mode is set to ‘single’. multi_selected
passed the index of the selected item and a bool to indicate whether the item was just added or removed from the selection. When ItemList
is in multi-select mode it only emits multi_select
signals and never the other.`
This leads to the problem that I can’t externally keep track of which items are selected (e.g. if I want to do some logic based on the selected items as they’re selected/deselected). Without an item_selected
signal being emitted to distinguish between starting a new selection with a single click compared to adding an item with a shift/ctrl-click, I can’t know whether the selection has been reset or not.
Is this a bug? Should item_selected
still be emitted if a single item is clicked/selected? Or if this intended behaviour and I’m missing something?