don't use parent window of a TLW in HandleOnNavigationKey(), even if it's apparently harmless it's wrong to involve the parent TLW in the code navigating inside this one
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
521d34369b
commit
391b16953a
@ -316,7 +316,10 @@ wxRadioButton* wxGetSelectedButtonInGroup(wxRadioButton *btn)
|
||||
|
||||
void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
|
||||
{
|
||||
wxWindow *parent = m_winParent->GetParent();
|
||||
// for a TLW we shouldn't involve the parent window, it has nothing to do
|
||||
// with keyboard navigation inside this TLW
|
||||
wxWindow *parent = m_winParent->IsTopLevel() ? NULL
|
||||
: m_winParent->GetParent();
|
||||
|
||||
// the event is propagated downwards if the event emitter was our parent
|
||||
bool goingDown = event.GetEventObject() == parent;
|
||||
|
Loading…
Reference in New Issue
Block a user