diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-03-13 23:14:35 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-03-13 23:14:35 -0300 |
commit | 0a717ffee270b3d2761aaae6a42c06d999a5b823 (patch) | |
tree | a52dd64a8c76e24f4734f917af3a124f4dea6d4b /scene | |
parent | 31ce3c5fd0300aac1e86bced1efc5f9ec94bdb6b (diff) | |
parent | 81757d2e977d959e6b0bc26f9fa990417ca91de9 (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts:
modules/multiscript/register_types.cpp
platform/android/java/src/com/android/godot/GodotLib.java
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/line_edit.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index ad1b7fd66b..22316acaba 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -748,6 +748,11 @@ bool LineEdit::is_secret() const { void LineEdit::select(int p_from, int p_to) { + if (p_from==0 && p_to==0) { + selection_clear(); + return; + } + int len = text.length(); if (p_from<0) p_from=0; @@ -786,7 +791,7 @@ void LineEdit::_bind_methods() { ObjectTypeDB::bind_method(_MD("is_editable"),&LineEdit::is_editable); ObjectTypeDB::bind_method(_MD("set_secret","enabled"),&LineEdit::set_secret); ObjectTypeDB::bind_method(_MD("is_secret"),&LineEdit::is_secret); - ObjectTypeDB::bind_method(_MD("select","from","to"),&LineEdit::is_secret,DEFVAL(0),DEFVAL(-1)); + ObjectTypeDB::bind_method(_MD("select","from","to"),&LineEdit::select,DEFVAL(0),DEFVAL(-1)); ADD_SIGNAL( MethodInfo("text_changed", PropertyInfo( Variant::STRING, "text" )) ); ADD_SIGNAL( MethodInfo("text_entered", PropertyInfo( Variant::STRING, "text" )) ); |