diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-09-25 23:10:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-25 23:10:32 +0200 |
commit | 5567cbe6aeb857b98694acad6fce6b66e9d7be73 (patch) | |
tree | 8115c0dba9ff2d7db18e0bbe1e8f15ca71e85984 | |
parent | 7bb9a26de383d811cb6a8bc3f8fac7008f58acc9 (diff) | |
parent | 8b80e9733821cbe2ae0701edf11a312722c7d306 (diff) |
Merge pull request #11545 from Paulb23/line_edit_caret_blink_resetting_issue_10764
Fixed caret blink and speed resetting in scenes, issue 10764
[ci skip]
-rw-r--r-- | scene/gui/line_edit.cpp | 2 | ||||
-rw-r--r-- | scene/main/scene_tree.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 7493ea95a8..aa5ae089bf 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -534,7 +534,7 @@ void LineEdit::_notification(int p_what) { switch (p_what) { #ifdef TOOLS_ENABLED case NOTIFICATION_ENTER_TREE: { - if (Engine::get_singleton()->is_editor_hint()) { + if (!get_tree()->is_node_being_edited(this)) { cursor_set_blink_enabled(EDITOR_DEF("text_editor/cursor/caret_blink", false)); cursor_set_blink_speed(EDITOR_DEF("text_editor/cursor/caret_blink_speed", 0.65)); diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index b020238cac..5a1388458b 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -650,7 +650,7 @@ void SceneTree::set_quit_on_go_back(bool p_enable) { bool SceneTree::is_node_being_edited(const Node *p_node) const { - return Engine::get_singleton()->is_editor_hint() && edited_scene_root && edited_scene_root->is_a_parent_of(p_node); + return Engine::get_singleton()->is_editor_hint() && edited_scene_root && (edited_scene_root->is_a_parent_of(p_node) || edited_scene_root == p_node); } #endif |