Avoid unnecessary assignment in wxOSX build.
Don't assign to the variable only to overwrite it with a new value. Closes #16436. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1461,15 +1461,12 @@ wxDataViewSpinRenderer::wxDataViewSpinRenderer( int min, int max, wxDataViewCell
|
|||||||
wxWindow* wxDataViewSpinRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value )
|
wxWindow* wxDataViewSpinRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value )
|
||||||
{
|
{
|
||||||
long l = value;
|
long l = value;
|
||||||
#ifdef __WXMAC__
|
|
||||||
wxSize size = wxSize( wxMax(70,labelRect.width ), -1 );
|
|
||||||
#endif
|
|
||||||
wxString str;
|
wxString str;
|
||||||
str.Printf( wxT("%d"), (int) l );
|
str.Printf( wxT("%d"), (int) l );
|
||||||
wxSpinCtrl *sc = new wxSpinCtrl( parent, wxID_ANY, str,
|
wxSpinCtrl *sc = new wxSpinCtrl( parent, wxID_ANY, str,
|
||||||
labelRect.GetTopLeft(), labelRect.GetSize(), wxSP_ARROW_KEYS|wxTE_PROCESS_ENTER, m_min, m_max, l );
|
labelRect.GetTopLeft(), labelRect.GetSize(), wxSP_ARROW_KEYS|wxTE_PROCESS_ENTER, m_min, m_max, l );
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
size = sc->GetSize();
|
const wxSize size = sc->GetSize();
|
||||||
wxPoint pt = sc->GetPosition();
|
wxPoint pt = sc->GetPosition();
|
||||||
sc->SetSize( pt.x - 4, pt.y - 4, size.x, size.y );
|
sc->SetSize( pt.x - 4, pt.y - 4, size.x, size.y );
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user