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.
[201_70] 修复图片缩放的撤销问题
如何测试
Ctrl+Z撤销,应该只需要一次就能完全恢复到原始尺寸2026/1/30
What
在图片鼠标拖拽缩放功能中添加编辑会话标记,将整个拖拽过程作为一个事务处理,避免撤销时逐帧回退
Why
原实现中,鼠标拖拽缩放图片时,每帧修改都会调用
tree-set!触发独立的撤销记录,导致用户需要按多次Ctrl+Z才能完全撤销一次拖拽操作这不符合用户直觉,每次拖拽应该对应一次撤销操作,与表格格线拖动等操作保持一致
How
format-geometry-edit.scm中添加image-resize-mark全局变量(编辑会话标记)start-drag-left)调用(mark-new)创建标记并(mark-start)开始编辑会话end-drag-left)调用(mark-end)结束编辑会话,将整个拖拽过程合并为一个撤销记录