diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index ad9fdc5858..870354a27f 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -1371,8 +1371,7 @@ void wxPropertyGridPageState::DoRemoveFromSelection( wxPGProperty* prop ) { // If first item (i.e. one with the active editor) was // deselected, then we need to take some extra measures. - wxArrayPGProperty sel = m_selection; - sel.erase( sel.begin() + i ); + wxArrayPGProperty sel(m_selection.begin() + 1, m_selection.end()); wxPGProperty* newFirst = sel.empty()? NULL: sel[0];