Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The index of the current item in menus is initialised to 0 #139

Open
lenormf opened this issue Jul 19, 2021 · 0 comments
Open

The index of the current item in menus is initialised to 0 #139

lenormf opened this issue Jul 19, 2021 · 0 comments
Labels
Bug Something isn't working

Comments

@lenormf
Copy link

lenormf commented Jul 19, 2021

Describe the bug
The index of the currently selected item in a menu is initialised to 0, despite the menu being still empty.

This makes it impractical to know whether the list has already been populated without checking the array of items directly (get_item_list()).

To Reproduce
Steps to reproduce the behavior:

  1. Instantiate a menu (checkbox, scroll…)
  2. get_selected_item_index() returns 0

Expected behavior
The _selected_item variable should be initialised to -1 (or any other appropriate value).

@lenormf lenormf added the Bug Something isn't working label Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant