fix(问题修复): 修复套印转换与编辑缺陷
build.yaml / build (push) Successful in 44s

This commit is contained in:
xiaoqidun committed 2026-09-30 16:35:24 +08:00
1 parent e4af1e7318
commit 59a2c4d8fe
9 files changed
+187 -83

No files matched your search

+5 -1
View File
@@ -562,7 +562,11 @@ func (e *Editor) updateObjectOrigins(page int, objects []GraphicObject, preserve
if origin != nil {
capability := e.objectCapabilities(before[i], orderable)
if !capability.Transform {
return fmt.Errorf("object %q is read-only for this operation: %w", ids[i], capability.editError())
beforeBox, beforeCTM := editorGeometry(before[i])
afterBox, afterCTM := editorGeometry(object)
if !capability.Update && !(preserved && capability.Delete) || before[i].Type != object.Type || beforeBox != afterBox || beforeCTM != afterCTM {
return fmt.Errorf("object %q is read-only for this operation: %w", ids[i], capability.editError())
}
}
if !preserved && !capability.Update && editorPreservedObject(before[i], object) && capability.Paint {
if err := e.validatePreservedAppearance(before[i], object); err != nil {