Fix wxTextEntry::SelectAll() in presence of hints in wxGTK.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Sep 2010 22:10:07 +0000 (22:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Sep 2010 22:10:07 +0000 (22:10 +0000)
commit6eb6062821301cd9f3ec6907af98567c2c0b8bce
tree5c84b2c7d52f9c59901b77ea7c28cf8c8ddcbe9d
parenta99dbd9eba7a0b9af0b8c2c44cac9fcf55a59cc7
Fix wxTextEntry::SelectAll() in presence of hints in wxGTK.

Translation of wx (-1, -1) selection to (0, GetValue().length()) in
wxTextCtrl::SetSelection() was unnecessary as it ended up calling the base
class wxTextEntry::SetSelection() version which didn't need it. Moreover, this
translation was actually harmful when the text control happened to show a hint
string as its official value was empty in this case and so SetSelection(0, 0)
was called which didn't do anything and broke clearing/changing the controls
text when it was showing a hint.

Simply don't translate the indices when using a single line control to fix
this.

See #12475.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65550 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/gtk/textctrl.cpp