-
-
Notifications
You must be signed in to change notification settings - Fork 5
Fix group deletion functionality - enable Delete key support for groups #42
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Initialize groups list in NodeGraph constructor - Add groups serialization/deserialization to persist groups in files - Add groups cleanup to clear_graph() method - Add duplicate prevention checks in CreateGroupCommand - Groups now properly survive file save/load cycles - Multiple undo/redo operations no longer create duplicate groups Fixes issue where undoing and redoing group creation would result in duplicate groups appearing in the scene. 🤖 Generated with [Claude Code](https://claude.ai/code)
- Add GroupPropertiesDialog with full UI for editing group properties - Add alpha sliders for precise transparency control (background, border, title, selection colors) - Add GroupPropertyChangeCommand for undoable property changes with batch support - Add context menu support in Group class and NodeEditorView - Add GroupPreviewWidget with transparency visualization - Fix QPainter cleanup and QPointF arithmetic issues - Simplify CSS styling to avoid Qt stylesheet parser warnings Users can now right-click groups to access Properties dialog and adjust all color properties including transparency values with proper undo/redo support.
- Add Groups section parsing to FlowFormatHandler markdown parser - Add Groups section export to FlowFormatHandler markdown writer - Update Group.serialize() to include complete color data with RGBA values - Update Group.deserialize() to restore all color properties and brushes - Update FlowSpec documentation with comprehensive groups specification - Remove creation_timestamp from groups (unused metadata clutter) - Add password_generator_tool_group.md example demonstrating groups in markdown Groups now fully serialize/deserialize with transparency support in .md files. All group properties including colors, position, size, padding, and membership are properly saved and restored when loading graphs from markdown format.
- Enhanced copy_selected() to include groups in clipboard data - Added complete property preservation for nodes (colors, size, GUI state) - Implemented group copy/paste with full property restoration - Fixed CreateNodeCommand to use correct Node API (calculate_absolute_minimum_size) - Added external clipboard support for selections with groups - Resolved 'Node object has no attribute min_width' runtime error 🤖 Generated with [Claude Code](https://claude.ai/code)
Fixed issue where pasted groups with member nodes were being transformed twice: - Once correctly by PasteNodesCommand applying mouse position offset - Again incorrectly by Group.itemChange automatically moving member nodes Changes: - Added _is_pasting flag to NodeGraph to track paste operations - Modified Group.itemChange to skip automatic node movement during paste - Enhanced paste() method to accept mouse position parameter - Fixed data conversion to handle both 'uuid' and 'id' node identifiers Groups now paste correctly at mouse cursor position with proper node positioning. Generated with [Claude Code](https://claude.ai/code)
Added deferred GUI update mechanism for pasted nodes to ensure GUI widgets refresh correctly, similar to when loading graphs from files. Changes: - Added deferred _final_paste_update() method to PasteNodesCommand - Schedules GUI layout updates using QTimer.singleShot after paste completes - Calls node._update_layout() to force complete layout rebuild and pin updates - Only applies to regular nodes (excludes reroute nodes) This ensures pasted nodes with GUI code display their widgets correctly and behave identically to loaded nodes. Generated with [Claude Code](https://claude.ai/code)
Split the monolithic 1,181-line node_commands.py file into a well-organized package structure for better maintainability and code organization. Changes: - Created src/commands/node/ package with focused modules: * basic_operations.py - Create, delete, move node commands * property_changes.py - Property and code change commands * batch_operations.py - Paste, move/delete multiple commands - Reduced main node_commands.py to 21 lines (97% reduction) - Maintained 100% backward compatibility through re-exports - Added comprehensive docstrings and module documentation - Preserved all existing functionality and command behavior Benefits: - Better code organization and maintainability - Easier navigation and understanding of command types - Improved testability with focused modules - Extensible structure for future command additions Generated with [Claude Code](https://claude.ai/code)
…ete key - Add DeleteGroupCommand with full state preservation and undo support - Enhance DeleteMultipleCommand to handle Group objects alongside nodes/connections - Fix node_graph.py keyPressEvent to use DeleteMultipleCommand for all item types - Groups were previously ignored in keyboard deletion, now work seamlessly - Comprehensive undo/redo support maintains group properties, colors, and positioning - Update command exports to include new DeleteGroupCommand 🤖 Generated with [Claude Code](https://claude.ai/code)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
DeleteGroupCommandwith full state preservation and undo supportDeleteMultipleCommandto handle Group objects alongside existing node/connection supportnode_graph.pyto process all item types including groupsProblem Resolved
Users reported "groups are unable to be deleted" - the Delete key and standard deletion workflows completely ignored Group objects, making them impossible to remove from the graph.
Root Cause Analysis
DeleteGroupCommandexisted for handling group deletionDeleteMultipleCommandonly handled Node/RerouteNode/Connection objectskeyPressEventmethod innode_graph.pyignored Group objects entirelyTechnical Implementation
New
DeleteGroupCommand(src/commands/delete_group_command.py)Enhanced
DeleteMultipleCommand(src/commands/node/batch_operations.py)isinstance(item, Group)Fixed Keyboard Event Handling (
src/core/node_graph.py)DeleteMultipleCommandapproachTest Coverage
Comprehensive verification confirms:
Files Changed
src/commands/delete_group_command.py- New comprehensive group deletion commandsrc/commands/node/batch_operations.py- Enhanced multi-item deletion supportsrc/core/node_graph.py- Fixed keyboard event handling for all item typessrc/commands/__init__.py- Updated exports to include new commandImpact
This resolves a critical usability issue where groups became "permanent" once created, significantly improving the user experience and workflow efficiency.
🤖 Generated with Claude Code