don't send duplicate set/kill focus events when the text control part of the control gets/loses focus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -200,9 +200,7 @@ wxSpinCtrl *wxSpinCtrl::GetSpinForTextCtrl(WXHWND hwndBuddy)
|
|||||||
// process a WM_COMMAND generated by the buddy text control
|
// process a WM_COMMAND generated by the buddy text control
|
||||||
bool wxSpinCtrl::ProcessTextCommand(WXWORD cmd, WXWORD WXUNUSED(id))
|
bool wxSpinCtrl::ProcessTextCommand(WXWORD cmd, WXWORD WXUNUSED(id))
|
||||||
{
|
{
|
||||||
switch (cmd)
|
if ( cmd == EN_CHANGE )
|
||||||
{
|
|
||||||
case EN_CHANGE:
|
|
||||||
{
|
{
|
||||||
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId());
|
wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, GetId());
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
@@ -211,18 +209,6 @@ bool wxSpinCtrl::ProcessTextCommand(WXWORD cmd, WXWORD WXUNUSED(id))
|
|||||||
event.SetInt(GetValue());
|
event.SetInt(GetValue());
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
case EN_SETFOCUS:
|
|
||||||
case EN_KILLFOCUS:
|
|
||||||
{
|
|
||||||
wxFocusEvent event(cmd == EN_KILLFOCUS ? wxEVT_KILL_FOCUS
|
|
||||||
: wxEVT_SET_FOCUS,
|
|
||||||
m_windowId);
|
|
||||||
event.SetEventObject( this );
|
|
||||||
return GetEventHandler()->ProcessEvent(event);
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// not processed
|
// not processed
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user