Revert change to m_order assignment in wxRearrangeList::Create()
This partially reverts 7e1b64a2eb
as it
broke wxRearrangeList because assigning to m_order[n] used an
out-of-range index.
Another possible fix would be to replace reserve() call added in that
commit with resize(), but there doesn't seem to be any advantage in
assigning elements one by one, rather than all at once, as it had been
done before, so just revert this change instead.
See #17836.
This commit is contained in:
@@ -70,7 +70,6 @@ bool wxRearrangeList::Create(wxWindow *parent,
|
||||
}
|
||||
|
||||
// do create the real control
|
||||
m_order.reserve(count);
|
||||
if ( !wxCheckListBox::Create(parent, id, pos, size, itemsInOrder,
|
||||
style, validator, name) )
|
||||
return false;
|
||||
@@ -84,9 +83,10 @@ bool wxRearrangeList::Create(wxWindow *parent,
|
||||
// which would also update m_order itself.
|
||||
wxCheckListBox::Check(n);
|
||||
}
|
||||
m_order[n] = order[n];
|
||||
}
|
||||
|
||||
m_order = order;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user