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,
|
wxDefaultCoord,
|
||||||
wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT);
|
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),
|
wxCommandEventHandler(wxCalendarCtrl::OnMonthChange),
|
||||||
NULL, this);
|
NULL, this);
|
||||||
}
|
}
|
||||||
@@ -314,11 +314,11 @@ void wxCalendarCtrl::CreateYearSpinCtrl()
|
|||||||
wxSP_ARROW_KEYS | wxCLIP_SIBLINGS,
|
wxSP_ARROW_KEYS | wxCLIP_SIBLINGS,
|
||||||
-4300, 10000, GetDate().GetYear());
|
-4300, 10000, GetDate().GetYear());
|
||||||
|
|
||||||
m_spinYear->Connect(wxEVT_COMMAND_TEXT_UPDATED,
|
m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_TEXT_UPDATED,
|
||||||
wxCommandEventHandler(wxCalendarCtrl::OnYearTextChange),
|
wxCommandEventHandler(wxCalendarCtrl::OnYearTextChange),
|
||||||
NULL, this);
|
NULL, this);
|
||||||
|
|
||||||
m_spinYear->Connect(wxEVT_COMMAND_SPINCTRL_UPDATED,
|
m_spinYear->Connect(m_spinYear->GetId(), wxEVT_COMMAND_SPINCTRL_UPDATED,
|
||||||
wxCommandEventHandler(wxCalendarCtrl::OnYearChange),
|
wxCommandEventHandler(wxCalendarCtrl::OnYearChange),
|
||||||
NULL, this);
|
NULL, this);
|
||||||
}
|
}
|
||||||
|
@@ -58,7 +58,7 @@ bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// and handle user clicks on it
|
// and handle user clicks on it
|
||||||
Connect(wxEVT_COMMAND_BUTTON_CLICKED,
|
Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler(wxGenericColourButton::OnButtonClick),
|
wxCommandEventHandler(wxGenericColourButton::OnButtonClick),
|
||||||
NULL, this);
|
NULL, this);
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@ bool wxGenericFileDirButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// and handle user clicks on it
|
// and handle user clicks on it
|
||||||
Connect(wxEVT_COMMAND_BUTTON_CLICKED,
|
Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler(wxGenericFileDirButton::OnButtonClick),
|
wxCommandEventHandler(wxGenericFileDirButton::OnButtonClick),
|
||||||
NULL, this);
|
NULL, this);
|
||||||
|
|
||||||
|
@@ -59,7 +59,7 @@ bool wxGenericFontButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// and handle user clicks on it
|
// and handle user clicks on it
|
||||||
Connect(wxEVT_COMMAND_BUTTON_CLICKED,
|
Connect(GetId(), wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler(wxGenericFontButton::OnButtonClick),
|
wxCommandEventHandler(wxGenericFontButton::OnButtonClick),
|
||||||
NULL, this);
|
NULL, this);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user