Add multiple node deletion and undo auto-arrange#19
Conversation
Reviewer's Guide by SourceryThis pull request implements two main features: multi-node deletion and undo/redo functionality for the auto-arrange feature in the graph editor. The changes primarily affect the MonologueGraphEdit script, with minor adjustments to MonologueControl and SidePanelNodeDetails scripts. The implementation focuses on enhancing user interaction with the graph, improving selection handling, and integrating with the existing undo/redo system. File-Level Changes
Tips
|
There was a problem hiding this comment.
Hey @RailKill - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding unit tests for the new multiple node deletion and undo/redo functionality to ensure robustness and prevent regressions.
- The
_inputfunction in MonologueGraphEdit.gd has become quite complex. Consider breaking it down into smaller, more focused functions for better readability and maintainability.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
| @@ -36,11 +36,13 @@ func on_graph_node_selected(node: MonologueGraphNode, bypass: bool = false): | |||
| if not bypass: | |||
| var graph_edit = control_node.get_current_graph_edit() | |||
| await get_tree().create_timer(0.1).timeout | |||
There was a problem hiding this comment.
suggestion (bug_risk): Consider a more deterministic approach to handling timing
Using a timer with a fixed delay could lead to race conditions. Consider finding a more deterministic way to handle this timing issue, such as using signals or callbacks.
var timer = Timer.new()
add_child(timer)
timer.set_one_shot(true)
timer.set_wait_time(0.1)
timer.timeout.connect(_on_timer_timeout)
timer.start()
func _on_timer_timeout():
# Place the code that should run after the delay here
|
It seems to work perfectly! |
This PR does the following:
Deletekey. This action is undo-able.Summary by Sourcery
Introduce the ability to delete multiple selected nodes with undo support and enhance the auto-arrange feature with undo/redo capabilities. Improve node selection and position management in the graph editor.
New Features:
Enhancements: