]> git.saurik.com Git - wxWidgets.git/commitdiff
no real changes, just use more readable helper wxTextEntry methods (patch 1910165 )
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 15 Mar 2008 02:52:32 +0000 (02:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 15 Mar 2008 02:52:32 +0000 (02:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/combobox.cpp
src/msw/combobox.cpp

index 6f6c9fecdcdffba8c7c9839a22d7205824572784..3e3429f1faeb52696edbbc4324d15b9f2343cf6c 100644 (file)
@@ -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
index 71e4192405e63f483bbc5839bf15fdd0f2e7e318..2de9a4e10b09ced8f3fdc0233c811e68169778a1 100644 (file)
@@ -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