Fix wxCalendarEvent and wxTextUrlEvent event classes implementing Clone() correctly (as pointed out by the new runtime check)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-12-27 14:23:38 +00:00
parent 588ba23758
commit 7e7a19f152
2 changed files with 16 additions and 7 deletions

View File

@@ -160,17 +160,19 @@ public:
wxCalendarEvent() : m_wday(wxDateTime::Inv_WeekDay) { }
wxCalendarEvent(wxWindow *win, const wxDateTime& dt, wxEventType type)
: wxDateEvent(win, dt, type),
m_wday(wxDateTime::Inv_WeekDay)
{
}
m_wday(wxDateTime::Inv_WeekDay) { }
wxCalendarEvent(const wxCalendarEvent& event)
: wxDateEvent(event), m_wday(event.m_wday) { }
void SetWeekDay(const wxDateTime::WeekDay wd) { m_wday = wd; }
wxDateTime::WeekDay GetWeekDay() const { return m_wday; }
virtual wxEvent *Clone() const { return new wxCalendarEvent(*this); }
private:
wxDateTime::WeekDay m_wday;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxCalendarEvent)
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCalendarEvent)
};
// ----------------------------------------------------------------------------