You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disabled items of an ItemList still trigger item_selected and item_activated signals when using the mouse. Even though the documentation states that:
Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing Enter).
Visually, they are as expected (grayed out and can't grab focus).
This seems to be a recurring problem as it has happened in Godot 2 (#5683) and Godot 3 (#37277) as well.
According to the comments in #37277, PR #37285 (#60123) is supposed to fix it for Godot 4. But it still seems to be an issue.
The PR suggests using disabled for rendering and selectable for actual selection. If that's the final verdict on the matter, then the documentation should be updated to reflect this.
Steps to reproduce
Create a simple scene.
Add an ItemList and add several items to it via the Inspector. Disable one or more items.
Attach a script to the item list with the following code:
YuriSizov
changed the title
4.0 RC 6 - ItemList: Disabled items still trigger selection and activation signals on mouse
ItemList: Disabled items still trigger selection and activation signals on mouse
Mar 21, 2023
…g signals
disabled -> not sending any signal at all (activated, selected, deselected, ...)
selected -> only possible when not disabled, and when selectable
Fixesgodotengine#74086.
Godot version
4.0.rc6
System information
Windows 10
Issue description
Disabled items of an
ItemList
still triggeritem_selected
anditem_activated
signals when using the mouse. Even though the documentation states that:Visually, they are as expected (grayed out and can't grab focus).
This seems to be a recurring problem as it has happened in Godot 2 (#5683) and Godot 3 (#37277) as well.
According to the comments in #37277, PR #37285 (#60123) is supposed to fix it for Godot 4. But it still seems to be an issue.
The PR suggests using
disabled
for rendering andselectable
for actual selection. If that's the final verdict on the matter, then the documentation should be updated to reflect this.Steps to reproduce
ItemList
and add several items to it via the Inspector. Disable one or more items.Minimal reproduction project
ItemList_DisabledItem_Bug.zip
The text was updated successfully, but these errors were encountered: