Skip to content

Commit

Permalink
Insert new key helper is back to 2D editor, missed it?
Browse files Browse the repository at this point in the history
  • Loading branch information
reduz committed Feb 9, 2016
1 parent 52326ac commit f51c26c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions tools/editor/animation_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
6 changes: 4 additions & 2 deletions tools/editor/plugins/canvas_item_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f51c26c

Please sign in to comment.