summaryrefslogtreecommitdiff
path: root/tools/editor/animation_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-01-27 17:29:55 +0100
committerRémi Verschelde <remi@verschelde.fr>2016-01-27 17:29:55 +0100
commit9e2736b98491141c4e9da7f134a54c77dbbd313e (patch)
treeb01d86664e2dd4aea184d62591939a6b9de61ca8 /tools/editor/animation_editor.cpp
parent928156652c77a7669ab6ea3f5d2de3a24e91620e (diff)
parent9f5d537993c81d98f8c5848279f9ce89661bfc85 (diff)
Merge pull request #3485 from TheHX/issue-3465
Fix animation toolbar
Diffstat (limited to 'tools/editor/animation_editor.cpp')
-rw-r--r--tools/editor/animation_editor.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp
index cdce910665..a247543830 100644
--- a/tools/editor/animation_editor.cpp
+++ b/tools/editor/animation_editor.cpp
@@ -3022,9 +3022,14 @@ Node *AnimationKeyEditor::get_root() const {
-void AnimationKeyEditor::set_keying(bool p_enabled) {
+void AnimationKeyEditor::update_keying() {
- keying=p_enabled;
+ bool keying_enabled=is_visible() && animation.is_valid();
+
+ if (keying_enabled==keying)
+ return;
+
+ keying=keying_enabled;
_update_menu();
emit_signal("keying_changed");
@@ -3032,7 +3037,7 @@ void AnimationKeyEditor::set_keying(bool p_enabled) {
bool AnimationKeyEditor::has_keying() const {
- return is_visible() && animation.is_valid();
+ return keying;
}
void AnimationKeyEditor::_query_insert(const InsertData& p_id) {