projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
avoid buffer overrun
[wxWidgets.git]
/
src
/
generic
/
choicdgg.cpp
diff --git
a/src/generic/choicdgg.cpp
b/src/generic/choicdgg.cpp
index 6e591c78cd370f518078f969e82b20e1e51db83a..2b5b11b2a2c2bac8be91b2bca346621067a7e346 100644
(file)
--- a/
src/generic/choicdgg.cpp
+++ b/
src/generic/choicdgg.cpp
@@
-218,8
+218,9
@@
size_t wxGetMultipleChoices(wxArrayInt& selections,
{
wxMultiChoiceDialog dialog(parent, message, caption, n, choices);
{
wxMultiChoiceDialog dialog(parent, message, caption, n, choices);
- if ( !selections.IsEmpty() )
- dialog.SetSelections(selections);
+ // call this even if selections array is empty and this then (correctly)
+ // deselects the first item which is selected by default
+ dialog.SetSelections(selections);
if ( dialog.ShowModal() == wxID_OK )
selections = dialog.GetSelections();
if ( dialog.ShowModal() == wxID_OK )
selections = dialog.GetSelections();
@@
-291,7
+292,7
@@
bool wxAnyChoiceDialog::Create(wxWindow *parent,
#endif
// 4) buttons
#endif
// 4) buttons
- topsizer->Add( CreateButtonSizer( styleDlg & (wxOK|wxCANCEL) ), 0, wx
CENTRE
| wxALL, 10 );
+ topsizer->Add( CreateButtonSizer( styleDlg & (wxOK|wxCANCEL) ), 0, wx
EXPAND
| wxALL, 10 );
#endif // !__SMARTPHONE__
#endif // !__SMARTPHONE__