fix bug in SetInsertionPoint(-1) implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -243,6 +243,11 @@ bool wxTextEntry::CanRedo() const
|
|||||||
|
|
||||||
void wxTextEntry::SetInsertionPoint(long pos)
|
void wxTextEntry::SetInsertionPoint(long pos)
|
||||||
{
|
{
|
||||||
|
// calling DoSetSelection(-1, -1) would select everything which is not what
|
||||||
|
// we want here
|
||||||
|
if ( pos == -1 )
|
||||||
|
pos = GetLastPosition();
|
||||||
|
|
||||||
// be careful to call DoSetSelection() which is overridden in wxTextCtrl
|
// be careful to call DoSetSelection() which is overridden in wxTextCtrl
|
||||||
// and not just SetSelection() here
|
// and not just SetSelection() here
|
||||||
DoSetSelection(pos, pos);
|
DoSetSelection(pos, pos);
|
||||||
|
Reference in New Issue
Block a user