Repository navigation
fix(shot): clamp resized capture area to annotations - #929
dengzhongyuan365-dev wants to merge 2 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dengzhongyuan365-dev The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideThe PR adds end-to-end annotation-aware selection resizing: it derives padded bounds from all visible shape content, enforces those bounds during mouse-driven resizing, preserves annotation screen positions as the selection moves, and applies coordinate-correct annotation compositing when saving cropped screenshots, including Treeland handling. Sequence diagram for annotation-aware selection resizingsequenceDiagram
participant User
participant MainWindow
participant ShapesWidget
User->>MainWindow: mousePressEF(mouseEvent)
MainWindow->>MainWindow: getAction(mouseEvent)
MainWindow->>ShapesWidget: shapesContentBoundingRectInWindow()
MainWindow->>MainWindow: constrainSelectionToShapes()
User->>MainWindow: mouseMoveEF(mouseEvent)
MainWindow->>MainWindow: resizeLeft/resizeRight/resizeTop/resizeBottom(mouseEvent)
MainWindow->>MainWindow: constrainSelectionToShapes()
MainWindow->>ShapesWidget: translateContents(offset)
MainWindow->>MainWindow: updateSelectionRelatedWidgets()
User->>MainWindow: mouseReleaseEF(mouseEvent)
MainWindow->>MainWindow: constrainSelectionToShapes()
MainWindow->>ShapesWidget: translateContents(offset)
MainWindow->>MainWindow: updateSelectionRelatedWidgets()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
c5eed32 to
c354179
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 检查语法错误和逻辑一致性 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 遵循代码规范和最佳实践 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 优化算法复杂度和资源使用 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 修复安全漏洞,加强输入验证 💡 改进建议代码示例// 暂无代码示例本报告由 AI 代码审查工具自动生成 |
Clamp screenshot selection resizing by existing annotation bounds. 根据已有标注外接矩形限制截图选区缩放范围。 Log: 修复编辑后缩放选区裁剪标注 PMS: TASK-393987 Influence: 截图编辑后缩小选区时,边界不会越过已有标注外接矩形,避免保存结果裁剪标注内容。
Clamp shape dragging by its painted bounds and keep resize cursor stable. 拖动标注时按外接矩形限制屏幕边界,并稳定拉伸光标状态。 Log: 修复全屏下标注拖动越界和拉伸光标异常 PMS: TASK-393987 Influence: 全屏截图编辑时标注不会在拖动后越出屏幕,拉伸标注时光标状态正确;未满屏时仍可扩张选区。
c354179 to
6ea8b1d
Compare
Clamp screenshot selection resizing by existing annotation bounds.
根据已有标注外接矩形限制截图选区缩放范围。
Log: 修复编辑后缩放选区裁剪标注
PMS: TASK-393987
Influence: 截图编辑后缩小选区时,边界不会越过已有标注外接矩形,避免保存结果裁剪标注内容。
Summary by Sourcery
Keep edited annotations fully included when resizing and saving screenshot selections.
Bug Fixes:
Enhancements:
Tests: