diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index d398f1f7b0..3daae78c26 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1183,13 +1183,9 @@ bool wxWindowBase::IsEnabled() const void wxWindowBase::NotifyWindowOnEnableChange(bool enabled) { - // Under some platforms there is no need to update the window state - // explicitly, it will become disabled when its parent is. On other ones we - // do need to disable all windows recursively though. -#ifndef wxHAS_NATIVE_ENABLED_MANAGEMENT DoEnable(enabled); -#endif // !defined(wxHAS_NATIVE_ENABLED_MANAGEMENT) +#ifndef wxHAS_NATIVE_ENABLED_MANAGEMENT // Disabling a top level window is typically done when showing a modal // dialog and we don't need to disable its children in this case, they will // be logically disabled anyhow (i.e. their IsEnabled() will return false) @@ -1205,7 +1201,6 @@ void wxWindowBase::NotifyWindowOnEnableChange(bool enabled) // they would still show as enabled even though they wouldn't actually // accept any input (at least under MSW where children don't accept input // if any of the windows in their parent chain is enabled). -#ifndef wxHAS_NATIVE_ENABLED_MANAGEMENT for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() ) @@ -1224,12 +1219,6 @@ bool wxWindowBase::Enable(bool enable) m_isEnabled = enable; - // If we call DoEnable() from NotifyWindowOnEnableChange(), we don't need - // to do it from here. -#ifdef wxHAS_NATIVE_ENABLED_MANAGEMENT - DoEnable(enable); -#endif // !defined(wxHAS_NATIVE_ENABLED_MANAGEMENT) - NotifyWindowOnEnableChange(enable); return true;