1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-30 16:26:50 +00:00

Better deselection handling in AnimationTree editors

This commit is contained in:
vaner-org
2025-08-30 17:56:36 +05:30
parent 825ef2387f
commit f6a6aad6eb
5 changed files with 77 additions and 0 deletions

View File

@@ -143,6 +143,11 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
return;
}
}
// If no point was selected, select host BlendSpace1D node.
if (selected_point == -1) {
EditorNode::get_singleton()->push_item(blend_space.ptr(), "", true);
}
}
if (mb.is_valid() && !mb->is_pressed() && dragging_selected_attempt && mb->get_button_index() == MouseButton::LEFT) {
@@ -529,7 +534,11 @@ void AnimationNodeBlendSpace1DEditor::_erase_selected() {
undo_redo->add_undo_method(this, "_update_space");
undo_redo->commit_action();
// Return selection to host BlendSpace1D node.
EditorNode::get_singleton()->push_item(blend_space.ptr(), "", true);
updating = false;
_update_tool_erase();
blend_space_draw->queue_redraw();
}