X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc6d9d0d454b3b3aa7fd48147988dab31e36ffb0..2028c33ab5a39a12bd410ac953731a56ad6377ba:/src/richtext/richtextctrl.cpp?ds=sidebyside diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 300a87d678..be2bc269ee 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -2812,12 +2812,13 @@ void wxRichTextCtrl::OnUpdateRedo(wxUpdateUIEvent& event) void wxRichTextCtrl::OnSelectAll(wxCommandEvent& WXUNUSED(event)) { - SelectAll(); + if (GetLastPosition() > 0) + SelectAll(); } void wxRichTextCtrl::OnUpdateSelectAll(wxUpdateUIEvent& event) { - event.Enable(GetLastPosition() >= 0); + event.Enable(GetLastPosition() > 0); } void wxRichTextCtrl::OnContextMenu(wxContextMenuEvent& event)