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:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user