修复多选删除图层问题

This commit is contained in:
李志鹏
2025-11-12 09:47:01 +08:00
parent c4fd772409
commit 29d835aeb3

View File

@@ -528,6 +528,7 @@ export class RemoveLayerCommand extends Command {
this.layerIndex = this.layers.value.findIndex(
(layer) => layer.id === this.layerId
);
this.removedLayer = this.layers.value[this.layerIndex];
this.isActiveLayer = this.layerId === this.activeLayerId.value;
@@ -593,6 +594,9 @@ export class RemoveLayerCommand extends Command {
}
});
this.layerIndex = this.layers.value.findIndex(
(layer) => layer.id === this.layerId
);
// 从图层列表中删除
this.layers.value.splice(this.layerIndex, 1);