X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..a70d268a1b43dc8ef2025b2beaeb5a595ba173fc:/src/osx/spinctrl_osx.cpp diff --git a/src/osx/spinctrl_osx.cpp b/src/osx/spinctrl_osx.cpp index 1e56099b01..a6b733ae0a 100644 --- a/src/osx/spinctrl_osx.cpp +++ b/src/osx/spinctrl_osx.cpp @@ -281,10 +281,8 @@ wxSpinCtrl::~wxSpinCtrl() // delete the controls now, don't leave them alive even though they would // still be eventually deleted by our parent - but it will be too late, the // user code expects them to be gone now - delete m_text; - m_text = NULL ; - delete m_btn; - m_btn = NULL ; + wxDELETE(m_text); + wxDELETE(m_btn); } // ---------------------------------------------------------------------------- @@ -395,6 +393,8 @@ void wxSpinCtrl::SetTextValue(int val) // select all text m_text->SetSelection(0, -1); + m_text->SetInsertionPointEnd(); + // and give focus to the control! // m_text->SetFocus(); Why???? TODO. }