setzer22 / egui_node_graph

Build your node graph applications in Rust, using egui
MIT License
711 stars 132 forks source link

Node can decide whether it can be deleted #76

Closed huisedenanhai closed 1 year ago

huisedenanhai commented 1 year ago

Add method can_delete to NodeDataTrait.

The close button on the node widget will not be shown if can_delete returns false.

setzer22 commented 1 year ago

Oops, looks like clippy has a different opinion on that :smile: Just collapse that if statement and we should be good to go :+1:

setzer22 commented 1 year ago

Thanks for the PR! And sorry about the wait :)