Defect #4718
MenuManager dies if you delete all items and then re-add
| Status: | Closed | Start date: | 2010-02-02 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Eric Davis | % Done: | 100% |
|
| Category: | Plugin API | |||
| Target version: | 0.9.3 | |||
| Affected version: | 0.9.2 | Resolution: | Fixed |
Description
If you delete all items for :top_menu and try to push new ones back, it errors out. An easy workaround is to delete one and push its replacement. The error output is attached.
Associated revisions
Fix an IndexError if all the :last menu items are deleted from a menu. #4718
History
Updated by Eric Davis almost 2 years ago
- Status changed from New to Assigned
Robert brought this to my attention on IRC. A workaround is to make sure a menu always has at least one item in it.
Updated by Eric Davis almost 2 years ago
- Status changed from Assigned to Resolved
- Target version set to 0.9.3
- % Done changed from 0 to 100
- Affected version set to 0.9.2
- Resolution set to Fixed
It turned out that the counters used to keep track of the :last menu items weren't decremented when an item was removed. This caused the menu to try to position the new menu item at a negative position.
Thanks for the bug report, I'm happy this was found. Fixed in r3447.
Updated by Jean-Philippe Lang almost 2 years ago
- Status changed from Resolved to Closed
Merged in 0.9-stable in r3461.