Fixed carret settings resetting (2.1)

This commit is contained in:
Paulb23 2017-10-07 14:54:10 +01:00
parent 1a934a58e4
commit dcaa7ba2b8
2 changed files with 2 additions and 2 deletions

View File

@ -543,7 +543,7 @@ void LineEdit::_notification(int p_what) {
switch (p_what) {
#ifdef TOOLS_ENABLED
case NOTIFICATION_ENTER_TREE: {
if (get_tree()->is_editor_hint()) {
if (get_tree()->is_editor_hint() && !get_tree()->is_node_being_edited(this)) {
cursor_set_blink_enabled(EDITOR_DEF("text_editor/caret_blink", false));
cursor_set_blink_speed(EDITOR_DEF("text_editor/caret_blink_speed", 0.65));

View File

@ -595,7 +595,7 @@ void SceneTree::set_editor_hint(bool p_enabled) {
bool SceneTree::is_node_being_edited(const Node *p_node) const {
return editor_hint && edited_scene_root && edited_scene_root->is_a_parent_of(p_node);
return editor_hint && edited_scene_root && (edited_scene_root->is_a_parent_of(p_node) || edited_scene_root == p_node);
}
bool SceneTree::is_editor_hint() const {