Merge pull request #84052 from SaracenOne/animtree_readonly_context

Unpress buttons in AnimationTree when switching to read-only mode.
This commit is contained in:
Rémi Verschelde 2023-11-11 23:05:37 +01:00
commit 97a102caf6
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 10 additions and 0 deletions

View File

@ -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 {