]> git.saurik.com Git - wxWidgets.git/commitdiff
Give timers a generated ID if wxID_ANY is passed
authorRobin Dunn <robin@alldunn.com>
Sun, 6 Aug 2006 01:18:57 +0000 (01:18 +0000)
committerRobin Dunn <robin@alldunn.com>
Sun, 6 Aug 2006 01:18:57 +0000 (01:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/timer.h

index 8955051268dd4ed237302b231052778408869e44..38a746ffa9c621d2c55548976b4cb2c17ce6f12a 100644 (file)
@@ -51,7 +51,7 @@ public:
 
     // same as ctor above
     void SetOwner(wxEvtHandler *owner, int timerid = wxID_ANY)
-        { m_owner = owner; m_idTimer = timerid; }
+        { m_owner = owner; m_idTimer = timerid == wxID_ANY ? wxNewId() : timerid; }
     wxEvtHandler * GetOwner() const { return m_owner; }
 
     virtual ~wxTimerBase();