Added GetId() to Connect calls to ensure only the relevant events are processed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -300,7 +300,7 @@ void wxCalendarCtrl::CreateMonthComboBox()
|
||||
wxDefaultCoord,
|
||||
wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT);
|
||||
|
||||
m_comboMonth->Connect(wxEVT_COMMAND_COMBOBOX_SELECTED,
|
||||
m_comboMonth->Connect(m_comboMonth->GetId(), wxEVT_COMMAND_COMBOBOX_SELECTED,
|
||||
wxCommandEventHandler(wxCalendarCtrl::OnMonthChange),
|
||||
NULL, this);
|
||||
}
|
||||
@@ -314,11 +314,11 @@ void wxCalendarCtrl::CreateYearSpinCtrl()
|
||||
wxSP_ARROW_KEYS | wxCLIP_SIBLINGS,
|
||||
-4300, 10000, GetDate().GetYear());
|
||||
|
||||
m_spinYear->Connect(wxEVT_COMMAND_TEXT_UPDATED,
|
||||
m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_TEXT_UPDATED,
|
||||
wxCommandEventHandler(wxCalendarCtrl::OnYearTextChange),
|
||||
NULL, this);
|
||||
|
||||
m_spinYear->Connect(wxEVT_COMMAND_SPINCTRL_UPDATED,
|
||||
m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_SPINCTRL_UPDATED,
|
||||
wxCommandEventHandler(wxCalendarCtrl::OnYearChange),
|
||||
NULL, this);
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id,
|
||||
}
|
||||
|
||||
// and handle user clicks on it
|
||||
Connect(wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
wxCommandEventHandler(wxGenericColourButton::OnButtonClick),
|
||||
NULL, this);
|
||||
|
||||
|
@@ -55,7 +55,7 @@ bool wxGenericFileDirButton::Create( wxWindow *parent, wxWindowID id,
|
||||
}
|
||||
|
||||
// and handle user clicks on it
|
||||
Connect(wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
wxCommandEventHandler(wxGenericFileDirButton::OnButtonClick),
|
||||
NULL, this);
|
||||
|
||||
|
@@ -59,7 +59,7 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id,
|
||||
}
|
||||
|
||||
// and handle user clicks on it
|
||||
Connect(wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
wxCommandEventHandler(wxGenericFontButton::OnButtonClick),
|
||||
NULL, this);
|
||||
|
||||
|
Reference in New Issue
Block a user