X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3c861501a451503b31c075ccb59d16b0ae01e99..359bd4d1a20bdd5c6374f25779a43e92eebe9a1d:/include/wx/timer.h diff --git a/include/wx/timer.h b/include/wx/timer.h index b0efc9d3ad..c79633c6c0 100644 --- a/include/wx/timer.h +++ b/include/wx/timer.h @@ -21,6 +21,7 @@ #include "wx/longlong.h" #include "wx/event.h" #include "wx/stopwatch.h" // for backwards compatibility +#include "wx/window.h" // only for NewControlId() // more readable flags for Start(): @@ -51,8 +52,12 @@ public: // same as ctor above void SetOwner(wxEvtHandler *owner, int timerid = wxID_ANY) - { m_owner = owner; m_idTimer = timerid == wxID_ANY ? wxNewId() : timerid; } - wxEvtHandler * GetOwner() const { return m_owner; } + { + m_owner = owner; + m_idTimer = timerid == wxID_ANY ? wxWindow::NewControlId() : timerid; + } + + wxEvtHandler *GetOwner() const { return m_owner; } virtual ~wxTimerBase();