diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index fa88b88732..078b5f4f95 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -1995,8 +1995,11 @@ wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize // If button is narrow make it a square and move it to the correct position s = but->GetSize(); if ( s.x < s.y ) - but->SetSize(wxSize(s.y, s.y)); - p.x = pos.x + sz.x - s.y; + { + s.x = s.y; + but->SetSize(s); + } + p.x = pos.x + sz.x - s.x; but->Move(p); if ( selected->HasFlag(wxPG_PROP_READONLY) && !selected->HasFlag(wxPG_PROP_ACTIVE_BTN) )