档案编辑器的时间表设置中,添加复制时间点功能 (#1786)#1803
Merged
Merged
Conversation
在档案编辑的时间表时间点列表中添加创建副本按钮,点击后可 原地复制当前选中的时间点(包括行动组 ActionSet 等所有属性), 并弹出成功提示。使用 ConfigureFileHelper.CopyObject 深拷贝, 与项目中其他复制功能(课表、时间表、科目)实现一致。
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1853734232
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
AddTimePoint 方法的循环条件 i < l.Count - 1 跳过了最后一个 元素,导致当复制的项目是倒数第二个时间点时,重复项被追加到 列表末尾而非插入到正确位置,破坏了时间顺序。 修复后将循环条件改为 i < l.Count,确保所有元素都参与比较。
HelloWRC
requested changes
May 16, 2026
Member
|
另外对于像上课和课间休息这样的时间块,应该插入到当前时间点的后方,不应与其它时间点重叠。具体请参考新建时间点时的插入行为。 |
- 移除 DuplicateTimePoint 方法中的冗余注释 - 对于分割线和行动类型的时间点,复制时插入到当前时间点后方,避免重叠
修改 DuplicateTimePoint 方法,对所有时间点类型(上课、课间休息、分割线、行动) 都将 StartTime 设置为选中时间点的 EndTime,确保复制的时间点插入到当前时间点后方, 与新增时间点行为一致
HelloWRC
requested changes
May 23, 2026
| ToolTip.Tip="创建选中时间点的副本。" | ||
| IsEnabled="{Binding $parent[views:ProfileSettingsWindow].ViewModel.SelectedTimePoint, Converter={x:Static ObjectConverters.IsNotNull}}" | ||
| Label="创建副本" /> | ||
| <controls:CommandBarSeparator /> |
Member
There was a problem hiding this comment.
应该考虑删除此分割线,将此操作与删除等时间点操作合并为一组。
… time point - Add boundary check to prevent duplicating beyond 23:59:59 - Add overlap prevention for class/break time points (consistent with AddTimeLayoutItem) - Add duplicate position check for separators and actions - Group 'create copy' and 'delete' buttons together by removing redundant separator Addresses review feedback from HelloWRC on PR ClassIsland#1803.
Member
|
@genius-alray 合并一下上游 |
HelloWRC
approved these changes
Jun 25, 2026
Member
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
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.


这个 Pull Request 做了什么?
在档案编辑器中时间表编辑的工具栏加入“创建副本”命令,可将选中的时间点进行原地复制(深拷贝)
相关 Issue
Fixes #1786
检查清单