X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b41ec29ad21fe56a82f22a586ca4b81431e600d8..7a56de34aba1bfe923f133986a0ca88fcbdd77e0:/src/generic/choicdgg.cpp diff --git a/src/generic/choicdgg.cpp b/src/generic/choicdgg.cpp index 99d5079b4f..5616efce9e 100644 --- a/src/generic/choicdgg.cpp +++ b/src/generic/choicdgg.cpp @@ -81,9 +81,10 @@ int ConvertWXArrayToC(const wxArrayString& aChoices, wxString **choices) { int n = aChoices.GetCount(); *choices = new wxString[n]; + for ( int i = 0; i < n; i++ ) { - *choices[i] = aChoices[i]; + (*choices)[i] = aChoices[i]; } return n; @@ -258,6 +259,10 @@ size_t wxGetMultipleChoices(wxArrayInt& selections, int WXUNUSED(width), int WXUNUSED(height)) { wxMultiChoiceDialog dialog(parent, message, caption, n, choices); + + if ( !selections.IsEmpty() ) + dialog.SetSelections(selections); + if ( dialog.ShowModal() == wxID_OK ) selections = dialog.GetSelections(); else