Skip to content

Node deletion is too greedy #2606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Keavon opened this issue Apr 22, 2025 · 4 comments · May be fixed by #2619
Open

Node deletion is too greedy #2606

Keavon opened this issue Apr 22, 2025 · 4 comments · May be fixed by #2619
Labels
Good First Issue Good for newcomers Paper Cut A small UX annoyance we should strive to improve

Comments

@Keavon
Copy link
Member

Keavon commented Apr 22, 2025

Deleting the selected "Equals" node:

Image

Incorrectly results in the overzealous deletion of its upstream nodes despite their usage by other nodes.

Image

This doesn't match the desired deletion-with-cleanup behavior. CtrlDelete can be used in this situation to delete only itself, but we need the normal behavior to work in this circumstance.

@Keavon Keavon added Good First Issue Good for newcomers Paper Cut A small UX annoyance we should strive to improve labels Apr 22, 2025
@github-project-automation github-project-automation bot moved this to Short-Term in Task Board Apr 22, 2025
@Abhinavpatel00
Copy link

changing

https://github.com/GraphiteEditor/Graphite/blob/a29802de366a1f0ca8446b282404bf15eb6f45e2/editor/src/messages/input_mapper/input_mappings.rs#L69

this to delete_children = false would fix the problem! should i add it in my PR? or would it break anything?

@Keavon
Copy link
Member Author

Keavon commented Apr 22, 2025

That would disable the feature, not fix the feature's erroneous behavior.

@Daniel53245
Copy link

I believe it is the problem in selecting the child nodes.
Doing some modification on https://github.com/GraphiteEditor/Graphite/blob/3d37ef79acdbb5f97fea0d046e5dad8ea22cf07a/editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs#L271/
might be working. I will see if I could fix it.

@Daniel53245
Copy link

I believe this function is responsible for searching nodes to delete /
https://github.com/GraphiteEditor/Graphite/blob/d39308c048cc439715943ff487294ffccaf12c70/editor/src/messages/portfolio/document/utility_types/network_interface.rs#L4177//

I am still trying to understand it and see if there is a way to change the behavior in the mentioned node graph

@Daniel53245 Daniel53245 linked a pull request Apr 25, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for newcomers Paper Cut A small UX annoyance we should strive to improve
Projects
Status: Short-Term
Development

Successfully merging a pull request may close this issue.

3 participants