google-code-export / musicpm

Automatically exported from code.google.com/p/musicpm
0 stars 0 forks source link

menus get corrupted when edited #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open the menu editor
2. select an element
3. press key up and key down multiple time and go through all the menu

What is the expected output? What do you see instead?
1. the menus get corrupted, names changed as well as other values.

If the menus are clicked instead of keypressed, no problems.

Original issue reported on code.google.com by aurelien...@gmail.com on 11 May 2010 at 5:18

GoogleCodeExporter commented 9 years ago
note: the orruption only occurs if the add menu item is pressed.

Original comment by aurelien...@gmail.com on 11 May 2010 at 10:42

GoogleCodeExporter commented 9 years ago
Issue fixed with commit r327
The problem was cause by wrong index.
When loaded, the index value is set in e.value (e = menu element).
When a new item is inserted, old index values remains and cause dupped indexes 
when
using e.value.

to fix the problem, the list.lastIndex is used instead. The value represents 
the last
selected element in the listbox. This value is always up-to-date.

Original comment by aurelien...@gmail.com on 26 May 2010 at 11:30