aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/animation_editor.cpp
diff options
context:
space:
mode:
authorFranklin Sobrinho2016-01-27 11:10:51 -0300
committerFranklin Sobrinho2016-01-27 11:10:51 -0300
commit9f5d537993c81d98f8c5848279f9ce89661bfc85 (patch)
treeaafa5befdb07ebcec94f28c8251183dbfa506115 /tools/editor/animation_editor.cpp
parent1d99e71d94add700ece9b1bf3a708ba33e6e1f75 (diff)
downloadgodot-9f5d537993c81d98f8c5848279f9ce89661bfc85.tar.gz
godot-9f5d537993c81d98f8c5848279f9ce89661bfc85.tar.zst
godot-9f5d537993c81d98f8c5848279f9ce89661bfc85.zip
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 cdce91066..a24754383 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) {