Skip to content

feat(cpn): reduce paste and drag'n'drop prompts#7379

Open
elecpower wants to merge 1 commit into
mainfrom
elecpower/cpn-enh-model-paste
Open

feat(cpn): reduce paste and drag'n'drop prompts#7379
elecpower wants to merge 1 commit into
mainfrom
elecpower/cpn-enh-model-paste

Conversation

@elecpower
Copy link
Copy Markdown
Collaborator

@elecpower elecpower commented May 19, 2026

Fixes #4920

Summary of changes:

  • 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.

Review Change Stack

@elecpower elecpower added this to the 3.0 milestone May 19, 2026
@elecpower elecpower added enhancement ✨ New feature or request companion Related to the companion software backport/2.12 To be backported to a 2.12 release also. labels May 19, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Caution

Review failed

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.

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

Labels

backport/2.12 To be backported to a 2.12 release also. companion Related to the companion software enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Companion: Copying models between radios has too many prompts

1 participant