diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index dfb09e38fc0e..668a135bc8ff 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -2857,6 +2857,7 @@ void AnimationKeyEditor::_notification(int p_what) { case NOTIFICATION_VISIBILITY_CHANGED: { EditorNode::get_singleton()->update_keying(); + emit_signal("keying_changed"); } break; case NOTIFICATION_ENTER_TREE: { diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index ef2df539e883..f3ff001d8424 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -409,7 +409,7 @@ void CanvasItemEditor::_node_removed(Node *p_node) { void CanvasItemEditor::_keying_changed() { - if (AnimationPlayerEditor::singleton->get_key_editor()->has_keying()) + if (AnimationPlayerEditor::singleton->get_key_editor()->is_visible()) animation_hb->show(); else animation_hb->hide(); @@ -2233,6 +2233,8 @@ void CanvasItemEditor::_notification(int p_what) { p->add_icon_item(get_icon("ControlAlignWide","EditorIcons"),"Full Rect",ANCHOR_ALIGN_WIDE); + AnimationPlayerEditor::singleton->get_key_editor()->connect("visibility_changed",this,"_keying_changed"); + _keying_changed(); } if (p_what==NOTIFICATION_READY) { @@ -3477,7 +3479,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { box_selecting=false; //zoom=0.5; singleton=this; - AnimationPlayerEditor::singleton->get_key_editor()->connect("keying_changed",this,"_keying_changed"); + set_process_unhandled_key_input(true); can_move_pivot=false; drag=DRAG_NONE;