Fix inserting items to wxRearrangeList (wxGTK)
Order array cannot be extended both in DoInsertItems() and DoInsertOneItem() functions because DoInsertOneItem() is invoked indirectly from DoInsertItems() (through the call to wxCheckListBox::DoInsertItems() and DoInsertItemsInLoop()) and therefore order array would be eventually extended by two items for one inserted list item. To avoid this duplicated actions, we should resign from overriding DoInsertOneItem().
This commit is contained in:
@@ -99,7 +99,6 @@ public:
|
||||
// Override this to keep our m_order array in sync with the real item state.
|
||||
virtual void Check(unsigned int item, bool check = true) wxOVERRIDE;
|
||||
|
||||
int DoInsertOneItem(const wxString& item, unsigned int pos) wxOVERRIDE;
|
||||
int DoInsertItems(const wxArrayStringsAdapter& items, unsigned int pos,
|
||||
void **clientData, wxClientDataType type) wxOVERRIDE;
|
||||
void DoDeleteOneItem(unsigned int n) wxOVERRIDE;
|
||||
|
Reference in New Issue
Block a user