feat: 裁剪组裁剪跟随选择组移动
This commit is contained in:
@@ -109,10 +109,7 @@ export class CompositeCommand extends Command {
|
||||
|
||||
console.log(`✅ 子命令执行成功: ${command.constructor.name}`);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
`❌ 子命令执行失败: ${command.constructor.name}`,
|
||||
error
|
||||
);
|
||||
console.error(`❌ 子命令执行失败: ${command.constructor.name}`, error);
|
||||
|
||||
// 执行失败时,撤销已执行的命令
|
||||
await this._rollbackExecutedCommands();
|
||||
@@ -142,9 +139,7 @@ export class CompositeCommand extends Command {
|
||||
return true;
|
||||
}
|
||||
|
||||
console.log(
|
||||
`↩️ 开始撤销复合命令,共 ${this.executedCommands.length} 个子命令`
|
||||
);
|
||||
console.log(`↩️ 开始撤销复合命令,共 ${this.executedCommands.length} 个子命令`);
|
||||
|
||||
try {
|
||||
// 逆序撤销已执行的命令
|
||||
@@ -164,10 +159,7 @@ export class CompositeCommand extends Command {
|
||||
results.push(finalResult);
|
||||
console.log(`✅ 子命令撤销成功: ${command.constructor.name}`);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
`❌ 子命令撤销失败: ${command.constructor.name}`,
|
||||
error
|
||||
);
|
||||
console.error(`❌ 子命令撤销失败: ${command.constructor.name}`, error);
|
||||
// 撤销失败不中断整个撤销过程,但要记录错误
|
||||
}
|
||||
} else {
|
||||
@@ -203,10 +195,7 @@ export class CompositeCommand extends Command {
|
||||
}
|
||||
console.log(`✅ 子命令回滚成功: ${command.constructor.name}`);
|
||||
} catch (error) {
|
||||
console.error(
|
||||
`❌ 子命令回滚失败: ${command.constructor.name}`,
|
||||
error
|
||||
);
|
||||
console.error(`❌ 子命令回滚失败: ${command.constructor.name}`, error);
|
||||
// 回滚失败不中断整个回滚过程
|
||||
}
|
||||
}
|
||||
@@ -238,9 +227,7 @@ export class CompositeCommand extends Command {
|
||||
commandCount: this.commands.length,
|
||||
executedCount: this.executedCommands.length,
|
||||
isExecuting: this.isExecuting,
|
||||
subCommands: this.commands.map((cmd) =>
|
||||
cmd.getInfo ? cmd.getInfo() : cmd.constructor.name
|
||||
),
|
||||
subCommands: this.commands.map((cmd) => (cmd.getInfo ? cmd.getInfo() : cmd.constructor.name)),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user