You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add option to apply action choice to all remaining models
selecting cancel stops further processing
Summary by CodeRabbit
New Features
Added "Apply to all remaining models" checkbox to paste operations, allowing a single conflict resolution decision to be applied to all remaining models being pasted.
Bug Fixes
Fixed cancel handling to properly stop paste processing.
Improved cleanup of moved/cut models during paste operations.
An error occurred during the review process. Please try again later.
📝 Walkthrough
Walkthrough
MdiChild::pasteModelData adds state variables to track conflict-resolution choices, replaces repeated per-model prompts with a single dialog offering "Apply to all remaining models," and refactors cancel to exit the loop. Post-paste cleanup of moved models from the cut list is repositioned to coordinate with index recording.
Changes
Conflict resolution and cleanup in multi-model paste
Layer / File(s)
Summary
Conflict resolution state, dialog logic, and post-paste cleanup companion/src/mdichild.cpp
State flags track whether the user chose overwrite, insert, or apply-to-all. The "Model already exists" dialog now includes a checkbox to apply the decision to all remaining conflicting models and is shown only until that option is enabled. Cancel exits the paste loop instead of continuing. Post-paste cleanup removes moved models from the cut list at the point where moved indices are recorded.
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
✨ Finishing Touches🧪 Generate unit tests (beta)
Create PR with unit tests
Commit unit tests in branch elecpower/cpn-enh-model-paste
Warning
Review ran into problems
🔥 Problems
Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.
Comment @coderabbitai help to get the list of available commands and usage tips.
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
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.
Fixes #4920
Summary of changes:
Summary by CodeRabbit
New Features
Bug Fixes