]> git.saurik.com Git - wxWidgets.git/blobdiff - src/richtext/richtextctrl.cpp
Add default constructor to wxGraphicsGradientStop.
[wxWidgets.git] / src / richtext / richtextctrl.cpp
index 300a87d678d356863e61ead075e533a57ba094c3..be2bc269ee5185a1612451b0463ad9835fea250b 100644 (file)
@@ -2812,12 +2812,13 @@ void wxRichTextCtrl::OnUpdateRedo(wxUpdateUIEvent& event)
 
 void wxRichTextCtrl::OnSelectAll(wxCommandEvent& WXUNUSED(event))
 {
 
 void wxRichTextCtrl::OnSelectAll(wxCommandEvent& WXUNUSED(event))
 {
-    SelectAll();
+    if (GetLastPosition() > 0)
+        SelectAll();
 }
 
 void wxRichTextCtrl::OnUpdateSelectAll(wxUpdateUIEvent& event)
 {
 }
 
 void wxRichTextCtrl::OnUpdateSelectAll(wxUpdateUIEvent& event)
 {
-    event.Enable(GetLastPosition() >= 0);
+    event.Enable(GetLastPosition() > 0);
 }
 
 void wxRichTextCtrl::OnContextMenu(wxContextMenuEvent& event)
 }
 
 void wxRichTextCtrl::OnContextMenu(wxContextMenuEvent& event)