fix wxTextCtrl::SetSelection(-1, -1) to behave as documented (patch 1700000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45443 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -157,6 +157,10 @@ wxGTK:
|
|||||||
- Fix wxNO_BORDER style for wxRadioBox (David Hart)
|
- Fix wxNO_BORDER style for wxRadioBox (David Hart)
|
||||||
- Fix wxTextCtrl::GetLineText() for empty lines (Marcin Wojdyr)
|
- Fix wxTextCtrl::GetLineText() for empty lines (Marcin Wojdyr)
|
||||||
|
|
||||||
|
wxUniv:
|
||||||
|
|
||||||
|
- Fix wxTextCtrl::SetSelection(-1, -1) to behave as documented (Anders Larsen)
|
||||||
|
|
||||||
|
|
||||||
2.8.3
|
2.8.3
|
||||||
-----
|
-----
|
||||||
|
@@ -1444,8 +1444,12 @@ wxString wxTextCtrl::GetSelectionText() const
|
|||||||
void wxTextCtrl::SetSelection(wxTextPos from, wxTextPos to)
|
void wxTextCtrl::SetSelection(wxTextPos from, wxTextPos to)
|
||||||
{
|
{
|
||||||
// selecting till -1 is the same as selecting to the end
|
// selecting till -1 is the same as selecting to the end
|
||||||
if ( to == -1 && from != -1 )
|
if ( to == -1 )
|
||||||
{
|
{
|
||||||
|
// and selecting (-1, -1) range is the same as selecting everything, by
|
||||||
|
// convention
|
||||||
|
if ( from == -1 )
|
||||||
|
from = 0;
|
||||||
to = GetLastPosition();
|
to = GetLastPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user