8000 Fix traversal when deleting nodes by adamgerhant · Pull Request #3358 · GraphiteEditor/Graphite · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@adamgerhant
Copy link
Collaborator

Closes #3357
image

@Keavon
Copy link
Member
Keavon commented Nov 10, 2025

As mentioned on Discord, we actually need to not delete any other nodes except the Add node in the annotated screenshot in your PR description. Sorry for the confusion. Marking as draft for the moment.

@Keavon
Copy link
Member
Keavon commented Nov 24, 2025

Basically, we should do this:

Step 1. Delete the node on its own and reconnect it using the current system
Step 2. Check if we left behind a chain of nodes from our other (secondary) inputs which now are disconnected and each one were sole dependents of the now-deleted node's secondary inputs
Step 3. Delete those if so, but if any node that wasn't directly connected to the now-deleted node is still around, that acts as the dependent to preserve those nodes

Correct cases:

Before After
capture capture
capture capture
capture capture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deletion of a node results in incorrect upstream nodes being deleted

3 participants

0