Fix code input mistakes and type convertion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f028e3325b
commit
65b8a129ad
@ -974,7 +974,7 @@ void wxTextCtrl::Replace(wxTextPos from, wxTextPos to, const wxString& text)
|
|||||||
// set selection range for GetSelection and GetInsertionPoint call
|
// set selection range for GetSelection and GetInsertionPoint call
|
||||||
// if give a range but the text length that give doesn't equal the range
|
// if give a range but the text length that give doesn't equal the range
|
||||||
// it mean clear the text in the range and set the text after `from`
|
// it mean clear the text in the range and set the text after `from`
|
||||||
if ( (to - from) != (int)text.Len() )
|
if ( (to - from) != (wxTextPos)text.Len() )
|
||||||
{
|
{
|
||||||
m_selStart = from;
|
m_selStart = from;
|
||||||
m_selEnd = from + text.Len();
|
m_selEnd = from + text.Len();
|
||||||
@ -1353,8 +1353,8 @@ void wxTextCtrl::SetInsertionPointEnd()
|
|||||||
|
|
||||||
wxTextPos wxTextCtrl::GetInsertionPoint() const
|
wxTextPos wxTextCtrl::GetInsertionPoint() const
|
||||||
{
|
{
|
||||||
//if has selection, the insert point should be the lower number of selection,
|
// if has selection, the insert point should be the lower number of selection,
|
||||||
//else should be current cursor position
|
// else should be current cursor position
|
||||||
long from;
|
long from;
|
||||||
if ( HasSelection() )
|
if ( HasSelection() )
|
||||||
GetSelection(&from, NULL);
|
GetSelection(&from, NULL);
|
||||||
@ -4719,8 +4719,6 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
|
|||||||
m_isModified = true;
|
m_isModified = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user