From: Vadim Zeitlin Date: Sat, 15 Mar 2008 02:52:32 +0000 (+0000) Subject: no real changes, just use more readable helper wxTextEntry methods (patch 1910165 ) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e976429dfade9fe445d1d5abf630e9458d51abbe no real changes, just use more readable helper wxTextEntry methods (patch 1910165 ) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index 6f6c9fecdc..3e3429f1fa 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -501,7 +501,7 @@ void wxComboBox::OnDelete(wxCommandEvent& WXUNUSED(event)) void wxComboBox::OnSelectAll(wxCommandEvent& WXUNUSED(event)) { - SetSelection(-1, -1); + SelectAll(); } void wxComboBox::OnUpdateCut(wxUpdateUIEvent& event) @@ -536,7 +536,7 @@ void wxComboBox::OnUpdateDelete(wxUpdateUIEvent& event) void wxComboBox::OnUpdateSelectAll(wxUpdateUIEvent& event) { - event.Enable(GetLastPosition() > 0); + event.Enable(!wxTextEntry::IsEmpty()); } #endif // wxUSE_COMBOBOX diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 71e4192405..2de9a4e10b 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -589,7 +589,7 @@ void wxComboBox::OnDelete(wxCommandEvent& WXUNUSED(event)) void wxComboBox::OnSelectAll(wxCommandEvent& WXUNUSED(event)) { - SetSelection(-1, -1); + SelectAll(); } void wxComboBox::OnUpdateCut(wxUpdateUIEvent& event) @@ -624,7 +624,7 @@ void wxComboBox::OnUpdateDelete(wxUpdateUIEvent& event) void wxComboBox::OnUpdateSelectAll(wxUpdateUIEvent& event) { - event.Enable(IsEditable() && GetLastPosition() > 0); + event.Enable(IsEditable() && !wxTextEntry::IsEmpty()); } #if wxUSE_TOOLTIPS