]> git.saurik.com Git - wxWidgets.git/commitdiff
Use IsThisEnabled() to test if AUI child is enabled, not IsEnabled().
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Dec 2011 19:33:31 +0000 (19:33 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Dec 2011 19:33:31 +0000 (19:33 +0000)
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

src/aui/auibar.cpp

index fb62e3089436e8440d02f8db21179a7820bbb794..d9bb3046b4f268011a79b517ef8901aac82b2880 100644 (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;