Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions egui_node_graph/src/editor_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ where
// executed at the end of this function.
let mut delayed_responses: Vec<NodeResponse<UserResponse, NodeData>> = prepend_responses;

// Delete selected nodes when Key::Delete is pressed
if ui.ctx().input(|i| i.key_pressed(Key::Delete)) {
for nid in &self.selected_nodes {
delayed_responses.push(NodeResponse::DeleteNodeUi(*nid));
}
}

// Used to detect when the background was clicked
let mut click_on_background = false;

Expand Down