Fixed caret blink and speed resetting in scenes, issue 10764

This commit is contained in:
Paulb23 2017-09-24 16:10:17 +01:00
parent 4ac7f5acf9
commit 8b80e97338
2 changed files with 2 additions and 2 deletions

View file

@ -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));

View file

@ -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