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
Pasting a node prompts you to if a deep copy should be created
You can only copy/cut 1 item at a time for now as I wanted to keep this PR small, but can look into this in future
The clipboard is stored as a field, separate from your device's clipboard
This is mostly to avoid having to serialize/deserialize nodes just to copy/cut/paste when it can be easily held in memory (especially if copying a very deep tree...)
If the clipboard is empty, the paste button is disabled
If you try to paste an item to a parent which already has an item with the same name, you're prompted to rename it
Other changes
Added overload of AlarmClientLeaf#createDetachedCopy to allow passing a new name
Added AlarmClientNdode#createDetachedCopy (copied from the alarm tree property editor branch)
Added AlarmTreeHelper#moveItem to abstract out some common code and refactored associated methods to call it
Refactored DuplicatePVAction to remove code duplication (ironically)
Added RenameDialog (used by the new paste action) and refactored RenameTreeItemAction and DuplicatePVAction to use it
Refactored RenameTreeItemAction to collapse a lot of duplicate code
(Sorry for the inflated diff because of refactors - figured if I was touching these classes anyway I may as well do some small cleanups)
Checklist
Testing:
The feature has automated tests
Tests were run
If not, explain how you tested your changes: Manually tested
Documentation:
The feature is documented
The documentation is up to date
Release notes:
Added an entry if the change is breaking or significant
@LordIdra, not sure about the copy scenario... Currently PVs can only occur once per alarm configuration. Or is it about copying between different configurations?
@LordIdra, not sure about the copy scenario... Currently PVs can only occur once per alarm configuration. Or is it about copying between different configurations?
Yeah that's just a silly oversight on my part, I did not realise that you could only have one instance of a PV per config as I never tried to add a duplicate one. I will just prompt the user for a rename each time and check the whole tree for an existing duplicate PV. Right now you cannot copy/paste between configs but this is definitely a good use case. So I think I'm going to change the implementation to actually use the system clipboard to facilitate this.
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.
Part of #3995
Depends on #3987
Headline change: adds 3 new context menu buttons

2026-11-17.16-42-30.mp4
Implementation details
Other changes
(Sorry for the inflated diff because of refactors - figured if I was touching these classes anyway I may as well do some small cleanups)
Checklist
Testing:
Documentation: