don't preselect the first item if the array with the initial selections is empty in wxMultiChoiceDialog
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -218,7 +218,8 @@ size_t wxGetMultipleChoices(wxArrayInt& selections,
|
|||||||
{
|
{
|
||||||
wxMultiChoiceDialog dialog(parent, message, caption, n, choices);
|
wxMultiChoiceDialog dialog(parent, message, caption, n, choices);
|
||||||
|
|
||||||
if ( !selections.IsEmpty() )
|
// call this even if selections array is empty and this then (correctly)
|
||||||
|
// deselects the first item which is selected by default
|
||||||
dialog.SetSelections(selections);
|
dialog.SetSelections(selections);
|
||||||
|
|
||||||
if ( dialog.ShowModal() == wxID_OK )
|
if ( dialog.ShowModal() == wxID_OK )
|
||||||
|
Reference in New Issue
Block a user