From 65b8a129ad979af5ad7257342553f30970636f0b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Sep 2014 17:39:25 +0000 Subject: [PATCH] Fix code input mistakes and type convertion git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77771 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/textctrl.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index f272ba9ee9..4fe9eb6932 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -974,7 +974,7 @@ void wxTextCtrl::Replace(wxTextPos from, wxTextPos to, const wxString& text) // set selection range for GetSelection and GetInsertionPoint call // 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` - if ( (to - from) != (int)text.Len() ) + if ( (to - from) != (wxTextPos)text.Len() ) { m_selStart = from; m_selEnd = from + text.Len(); @@ -1353,8 +1353,8 @@ void wxTextCtrl::SetInsertionPointEnd() wxTextPos wxTextCtrl::GetInsertionPoint() const { - //if has selection, the insert point should be the lower number of selection, - //else should be current cursor position + // if has selection, the insert point should be the lower number of selection, + // else should be current cursor position long from; if ( HasSelection() ) GetSelection(&from, NULL); @@ -4719,8 +4719,6 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig, m_isModified = true; } - - return true; }