summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-11-11 23:05:37 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-11-11 23:05:37 +0100
commit97a102caf6df5a56d7587f9bb08bcb00a470bc98 (patch)
tree8098d18111413d8fe268ab2b950b900ea1aafcea
parent8179ad558adfa1afd64ccbfb8382adcd027a35af (diff)
parent0e545d9e8842caaa18d1f05029d85d12425ccb79 (diff)
downloadredot-engine-97a102caf6df5a56d7587f9bb08bcb00a470bc98.tar.gz
Merge pull request #84052 from SaracenOne/animtree_readonly_context
Unpress buttons in AnimationTree when switching to read-only mode.
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 11b5cd488b..e9c8b0c610 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -76,6 +76,11 @@ void AnimationNodeStateMachineEditor::edit(const Ref<AnimationNode> &p_node) {
_update_graph();
}
+ if (read_only) {
+ tool_create->set_pressed(false);
+ tool_connect->set_pressed(false);
+ }
+
tool_create->set_disabled(read_only);
tool_connect->set_disabled(read_only);
}
@@ -1591,6 +1596,11 @@ void AnimationNodeStateMachineEditor::_update_mode() {
selection_tools_hb->hide();
}
+ if (read_only) {
+ tool_create->set_pressed(false);
+ tool_connect->set_pressed(false);
+ }
+
if (tool_connect->is_pressed()) {
transition_tools_hb->show();
} else {