X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a35701127e3e8d2c7fb433d85c7b3954ccbfc9f..e508567a95c7858f7bbf21d37c189fdd6f3eac2e:/src/generic/numdlgg.cpp diff --git a/src/generic/numdlgg.cpp b/src/generic/numdlgg.cpp index d8a6f2ae5f..0fb413c1ad 100644 --- a/src/generic/numdlgg.cpp +++ b/src/generic/numdlgg.cpp @@ -138,7 +138,7 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent, #endif // 4) buttons - topsizer->Add( CreateButtonSizer( wxOK|wxCANCEL ), 0, wxCENTRE | wxALL, 10 ); + topsizer->Add( CreateButtonSizer( wxOK|wxCANCEL ), 0, wxEXPAND | wxALL, 10 ); #endif // !__SMARTPHONE__ @@ -169,6 +169,7 @@ void wxNumberEntryDialog::OnOK(wxCommandEvent& WXUNUSED(event)) if ( m_value < m_min || m_value > m_max ) { // not a number or out of range + m_value = -1; EndModal(wxID_CANCEL); } @@ -198,7 +199,7 @@ long wxGetNumberFromUser(const wxString& msg, wxNumberEntryDialog dialog(parent, msg, prompt, title, value, min, max, pos); if (dialog.ShowModal() == wxID_OK) - return dialog.GetValue(); + return dialog.GetValue(); return -1; }