Fix for bug 1542 - setting of radio buttons in Selection bar

Problem: On Windows, if you set the "length" radio button in the selection bar, then tab round to it, this sets the "end" radio button.

This was caused by commit 7e49dc4.
The fix is to restore the previous code just for Windows.
This commit is contained in:
David Bailes 2016-11-03 13:59:04 +00:00
parent 0364f8e894
commit f296c768d5

View File

@ -1725,9 +1725,21 @@ void NumericTextCtrl::OnKeyDown(wxKeyEvent &event)
}
else if (keyCode == WXK_TAB) {
#if defined(__WXMSW__)
// Using Navigate() on Windows, rather than the following code causes
// bug 1542
wxWindow* parent = GetParent();
wxNavigationKeyEvent nevent;
nevent.SetWindowChange(event.ControlDown());
nevent.SetDirection(!event.ShiftDown());
nevent.SetEventObject(parent);
nevent.SetCurrentFocus(parent);
GetParent()->GetEventHandler()->ProcessEvent(nevent);
#else
Navigate(event.ShiftDown()
? wxNavigationKeyEvent::IsBackward
: wxNavigationKeyEvent::IsForward);
#endif
}
else if (keyCode == WXK_RETURN || keyCode == WXK_NUMPAD_ENTER) {