mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
dgui: Reset DirectOptionMenu highlighted index when replacing items
Not doing this causes issues if the item list is replaced by an item callback, since that means the unhighlight callback is never fired. Fixes #1125
This commit is contained in:
parent
c1fbb70c6d
commit
fe29aab568
@ -114,6 +114,7 @@ class DirectOptionMenu(DirectButton):
|
||||
)
|
||||
# Make sure it is on top of all the other gui widgets
|
||||
self.popupMenu.setBin('gui-popup', 0)
|
||||
self.highlightedIndex = None
|
||||
if not self['items']:
|
||||
return
|
||||
# Create a new component for each item
|
||||
|
Loading…
x
Reference in New Issue
Block a user