From f11849b7e8df2e6f9cd68701e8458f61b0d49d7c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 26 Oct 2018 01:35:28 +0200 Subject: [PATCH] Document not completely obvious wxRearrangeList::Set() behaviour Calling Set() resets the existing items order, which makes sense from the implementation point of view, but not necessarily expected by the users. See #18262. --- interface/wx/rearrangectrl.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/wx/rearrangectrl.h b/interface/wx/rearrangectrl.h index c6cceaded1..fa4d40eb5e 100644 --- a/interface/wx/rearrangectrl.h +++ b/interface/wx/rearrangectrl.h @@ -41,6 +41,12 @@ is to use wxRearrangeCtrl which combines it with two standard buttons to move the current item up or down. + Note that while most of the methods for items manipulation such as + Append(), Insert() or Delete(), inherited from wxItemContainer work as + expected for this class, Set() somewhat unexpectedly resets the order of + the items as it clears the control first, also clearing the order as a side + effect, before adding the new items. + @since 2.9.0 @library{wxcore}