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:
Vadim Zeitlin
2011-12-16 19:33:31 +00:00
parent 35f92de300
commit 03dc350fa6

View File

@@ -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;