Fix selection after inserting items in wxListBox in wxOSX
We need to adjust the indices of the currently selected items as we need to keep the same items, not the same indices, selected after new items insertion. Closes #18902.
This commit is contained in:
committed by
Vadim Zeitlin
parent
f7d50ed18c
commit
8bf53a7782
@@ -170,6 +170,8 @@ protected:
|
||||
wxArrayPtrVoid m_itemsClientData;
|
||||
|
||||
private:
|
||||
// Mostly the same as DoSetSelection() but doesn't call EnsureVisible().
|
||||
void DoSetSelectionWithoutEnsureVisible(int n, bool select);
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxListBox);
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
|
Reference in New Issue
Block a user