From fd839c4bd64f125ab8f184626f6f3d5119aec9ec Mon Sep 17 00:00:00 2001 From: rk Date: Fri, 22 Jan 2021 22:57:16 +0100 Subject: [PATCH] Fix selection when inserting multiple items into wxSelectionStore When inserting more than one item into wxSelectionStore in the default-selected state, the state of all the items bug the first one was wrongly set to "selected" initially. Just fix the typo in the AddAt() call, which was passed a wrong variable, to fix this. Closes #19040. --- src/generic/selstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/selstore.cpp b/src/generic/selstore.cpp index d8f9f7575e..b1b6bb50af 100644 --- a/src/generic/selstore.cpp +++ b/src/generic/selstore.cpp @@ -207,7 +207,7 @@ void wxSelectionStore::OnItemsInserted(unsigned item, unsigned numItems) // items indices. for ( unsigned n = item; n < item + numItems; n++ ) { - m_itemsSel.AddAt(item, idx++); + m_itemsSel.AddAt(n, idx++); } }