Skip to content
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

[BUG] Deleting Node from Merged Tree #863

Open
jadeandtea opened this issue Oct 8, 2024 · 2 comments
Open

[BUG] Deleting Node from Merged Tree #863

jadeandtea opened this issue Oct 8, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jadeandtea
Copy link
Collaborator

jadeandtea commented Oct 8, 2024

Description

When deleting a node from a branch from the tree that has been merged farther ahead, the program does not know what to do.

Steps to Reproduce

  1. Choose a case rule that create multiple branches, such as Nurikabe White or Black.
  2. Make any number of steps in both or either of the branches. The move doesn't have to be valid, and the resulting cell(s) does not have to be the same between the branches.
  3. Merge the two branches. There does not have to be any similar tiles; the program should allow for this type of branch --> merge.
Screenshot 2024-10-08 at 5 07 04 PM
  1. Delete one of the nodes on either branch.
Screenshot 2024-10-08 at 5 07 30 PM

Expected Behavior

When deleting the node, it should delete all nodes in front of it, including the merged node.

Screenshots

No response

Puzzle Files

No response

Additional Context

No response

@jadeandtea jadeandtea added the bug Something isn't working label Oct 8, 2024
@ADEPLI ADEPLI assigned ADEPLI and unassigned ADEPLI Oct 15, 2024
@ADEPLI
Copy link
Collaborator

ADEPLI commented Oct 20, 2024

Has there been an update that modified the program's behavior? The program seems to be trying to delete the node in front, although there is a visual glitch with the arrows and sometimes the node not completely updating. I don't see any commits that would have addressed this issue, but the behavior seems to have changed. Does it still appear the same for everyone else?

  1. Original State
image
  1. After Deleting Previous Node
image

@ADEPLI ADEPLI removed their assignment Oct 22, 2024
jadeandtea added a commit to jadeandtea/LEGUP_FORK that referenced this issue Dec 2, 2024
@jadeandtea jadeandtea self-assigned this Dec 2, 2024
@jadeandtea
Copy link
Collaborator Author

Progress Report

The current version of deletion does the following:

  1. Remove the current node from the parent's child list in the internal Tree
  2. Remove all future nodes from the displayed tree.

Clearly, this would lead to the issue above, where the program still is told to display the merged node's transition node and node through the lower chain. On my dev branch, I have a solution that will cleanly delete all the connections stemming forward from the deleted node. However, it causes problems with the undo functionality.

The current undo implementation does the following:

  1. Puts the parent's child back.
  2. Traverses the reconnected part of the tree and puts back the elements in the tree view.
    And that's it.

Because the disconnected part of the tree is still fully connected, by reconnecting the single link, the tree reforms and works properly. I mean, it works I guess.

I'll see if I can figure out a way to disconnect only the parts of the tree that need to be disconnected, then change the undo to reconnect only those parts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants