made GetSelection return insertion point if no selection

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7704 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee
2000-07-06 23:47:47 +00:00
parent 717562e490
commit 678ddc9aa9
2 changed files with 6 additions and 4 deletions

View File

@@ -785,8 +785,9 @@ void wxTextCtrl::GetSelection(long* from, long* to) const
if (!(GTK_EDITABLE(m_text)->has_selection))
{
if (from) *from = 0;
if (to) *to = 0;
long i = GetInsertionPoint();
if (from) *from = i;
if (to) *to = i;
return;
}

View File

@@ -785,8 +785,9 @@ void wxTextCtrl::GetSelection(long* from, long* to) const
if (!(GTK_EDITABLE(m_text)->has_selection))
{
if (from) *from = 0;
if (to) *to = 0;
long i = GetInsertionPoint();
if (from) *from = i;
if (to) *to = i;
return;
}