diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-05-27 17:44:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-27 17:44:35 +0200 |
commit | 51d7026cbc0a3c6f1bf33dcfcde2b20e1032dec1 (patch) | |
tree | c4c0a464b25acb2cce74ce9609da47d4ae729b6b | |
parent | 7487d2f8521d895df2f16b36d21992f8fde99f75 (diff) | |
parent | 560f5cb1042b926bc70b430f0d33f2489071bec8 (diff) |
Merge pull request #29227 from YeldhamDev/animplayer_bottom_pressed_fix_for_real
Actually fix animation editor's bottom panel button not being pressed on certain occasions
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/animation_player_editor_plugin.h | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index eabb781288..951e971615 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -703,7 +703,7 @@ void AnimationPlayerEditor::set_state(const Dictionary &p_state) { if (Object::cast_to<AnimationPlayer>(n) && EditorNode::get_singleton()->get_editor_selection()->is_selected(n)) { player = Object::cast_to<AnimationPlayer>(n); _update_player(); - show(); + editor->make_bottom_panel_item_visible(this); set_process(true); ensure_visibility(); @@ -1874,8 +1874,6 @@ void AnimationPlayerEditorPlugin::edit(Object *p_object) { if (!p_object) return; anim_editor->edit(Object::cast_to<AnimationPlayer>(p_object)); - // In case switching to a scene with an AnimationPlayer selected but with the animation editor closed. - button->set_pressed(true); } bool AnimationPlayerEditorPlugin::handles(Object *p_object) const { @@ -1898,7 +1896,7 @@ AnimationPlayerEditorPlugin::AnimationPlayerEditorPlugin(EditorNode *p_node) { editor = p_node; anim_editor = memnew(AnimationPlayerEditor(editor, this)); anim_editor->set_undo_redo(editor->get_undo_redo()); - button = editor->add_bottom_panel_item(TTR("Animation"), anim_editor); + editor->add_bottom_panel_item(TTR("Animation"), anim_editor); } AnimationPlayerEditorPlugin::~AnimationPlayerEditorPlugin() { diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h index 9b72ebac7e..b1026b5b9f 100644 --- a/editor/plugins/animation_player_editor_plugin.h +++ b/editor/plugins/animation_player_editor_plugin.h @@ -257,7 +257,6 @@ class AnimationPlayerEditorPlugin : public EditorPlugin { AnimationPlayerEditor *anim_editor; EditorNode *editor; - Button *button; protected: void _notification(int p_what); |