Merge pull request #11911 from Paulb23/line_edit_caret_resetting_2_1
Fixed caret settings resetting (2.1)
This commit is contained in:
commit
5ac1348523
|
@ -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));
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue