Use IsThisEnabled() to test if AUI child is enabled, not IsEnabled().
IsEnabled() returns false if the parent window is disabled and calling Enable() does not help with this, so we could keep trying and trying to enable the window unsuccessfully if it was reenabled while its parent was disabled, resulting in a never-ending stream of EVT_IDLE events. Closes #13767. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2150,7 +2150,7 @@ void wxAuiToolBar::DoIdleUpdate()
|
||||
{
|
||||
bool is_enabled;
|
||||
if (item.m_window)
|
||||
is_enabled = item.m_window->IsEnabled();
|
||||
is_enabled = item.m_window->IsThisEnabled();
|
||||
else
|
||||
is_enabled = (item.m_state & wxAUI_BUTTON_STATE_DISABLED) ? false : true;
|
||||
|
||||
|
Reference in New Issue
Block a user