Fix tab navigation bug with static boxes without enabled children.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 23 Jul 2013 12:44:29 +0000 (12:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 23 Jul 2013 12:44:29 +0000 (12:44 +0000)
commitdee22e3198c17e325ff4862520aec104d40b9948
tree6b8d2907a61adc602bc3ba3cfa8d003fb85bf353
parentbe1f902405def888b65c39832ce4a9fb56554880
Fix tab navigation bug with static boxes without enabled children.

wxControlContainer::AcceptsFocusFromKeyboard() returned true even if the
control didn't have any currently enabled -- and hence accepting focus --
children. This resulted in strange wxEVT_NAVIGATION_KEY propagation as it
unexpectedly wasn't handled in the control which pretended to accept focus and
instead bubbled up back into the parent, resulting in the focus returning to
the first child of the parent instead of skipping the static box with disabled
children and going to the next enabled child.

Fix this by checking that we have children that can be focused right now and
not only children that are focusable. Notice that this doesn't take care of
calling wxWindow::SetCanFocus() correctly when the children enabled/disabled
state changes so there might still be other problems, notably under wxGTK
where SetCanFocus() does something non-trivial, but it at least improves
things under wxMSW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/containr.h
src/common/containr.cpp