From 1f0e456620fd5f0dff7d2ef2c6ab9c144ca4950e Mon Sep 17 00:00:00 2001 From: Liam Treacy Date: Thu, 6 Dec 2018 14:42:50 +0000 Subject: [PATCH] Implement wxListBox::GetSelections() in wxQt --- src/qt/listbox.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/qt/listbox.cpp b/src/qt/listbox.cpp index d4b82855be..2fa3647bfd 100644 --- a/src/qt/listbox.cpp +++ b/src/qt/listbox.cpp @@ -135,9 +135,17 @@ bool wxListBox::IsSelected(int n) const return item->isSelected(); } -int wxListBox::GetSelections(wxArrayInt& WXUNUSED(aSelections)) const +int wxListBox::GetSelections(wxArrayInt& aSelections) const { - return 0; + aSelections.clear(); + + for ( unsigned int i = 0; i < GetCount(); ++i) + { + if ( IsSelected(i) ) + aSelections.push_back(i); + } + + return aSelections.size(); } unsigned wxListBox::GetCount() const