mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 04:20:07 +01:00
Fixes DeleteButton function
cf https://github.com/wxWidgets/Phoenix/issues/2511
This commit is contained in:
@@ -608,10 +608,10 @@ class RibbonButtonBar(RibbonControl):
|
||||
:see: :meth:`~RibbonButtonBar.ClearButtons`
|
||||
"""
|
||||
|
||||
for button in self._buttons:
|
||||
for i, button in enumerate(self._buttons):
|
||||
if button.id == button_id:
|
||||
self._layouts_valid = False
|
||||
self._buttons.pop(button)
|
||||
self._buttons.pop(i)
|
||||
self.Realize()
|
||||
self.Refresh()
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user