Merge pull request #58893 from TokageItLab/fix-deselect-skeleton-gizmo
This commit is contained in:
commit
85149303a5
@ -528,9 +528,7 @@ void Skeleton3DEditor::move_skeleton_bone(NodePath p_skeleton_path, int32_t p_se
|
|||||||
|
|
||||||
void Skeleton3DEditor::_joint_tree_selection_changed() {
|
void Skeleton3DEditor::_joint_tree_selection_changed() {
|
||||||
TreeItem *selected = joint_tree->get_selected();
|
TreeItem *selected = joint_tree->get_selected();
|
||||||
if (!selected) {
|
if (selected) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
const String path = selected->get_metadata(0);
|
const String path = selected->get_metadata(0);
|
||||||
if (!path.begins_with("bones/")) {
|
if (!path.begins_with("bones/")) {
|
||||||
return;
|
return;
|
||||||
@ -541,9 +539,14 @@ void Skeleton3DEditor::_joint_tree_selection_changed() {
|
|||||||
const String bone_path = "bones/" + itos(b_idx) + "/";
|
const String bone_path = "bones/" + itos(b_idx) + "/";
|
||||||
pose_editor->set_target(bone_path);
|
pose_editor->set_target(bone_path);
|
||||||
pose_editor->set_keyable(keyable);
|
pose_editor->set_keyable(keyable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pose_editor && pose_editor->is_inside_tree()) {
|
||||||
pose_editor->set_visible(selected);
|
pose_editor->set_visible(selected);
|
||||||
}
|
}
|
||||||
set_bone_options_enabled(selected);
|
set_bone_options_enabled(selected);
|
||||||
|
|
||||||
_update_properties();
|
_update_properties();
|
||||||
_update_gizmo_visible();
|
_update_gizmo_visible();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user