Added wxRadioButton::MSWWindowProc to reset m_focusJustSet -- otherwise,
if RB1 has the focus, then you click on RB2, then back on RB1, no command event will be generated for the last click. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b8b7f03cef
commit
aca78774b6
@ -52,6 +52,7 @@ public:
|
||||
// implementation only from now on
|
||||
virtual bool MSWCommand(WXUINT param, WXWORD id);
|
||||
virtual void Command(wxCommandEvent& event);
|
||||
virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
virtual void SetFocus();
|
||||
|
||||
|
@ -188,4 +188,19 @@ wxSize wxRadioButton::DoGetBestSize() const
|
||||
return wxSize(wRadio, hRadio);
|
||||
}
|
||||
|
||||
long wxRadioButton::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
{
|
||||
if (nMsg == WM_SETFOCUS)
|
||||
{
|
||||
m_focusJustSet = TRUE;
|
||||
|
||||
long ret = wxControl::MSWWindowProc(nMsg, wParam, lParam);
|
||||
|
||||
m_focusJustSet = FALSE;
|
||||
|
||||
return ret;
|
||||
}
|
||||
return wxControl::MSWWindowProc(nMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
#endif // wxUSE_RADIOBTN
|
||||
|
Loading…
Reference in New Issue
Block a user