diff --git a/src/quest_editor/actions/TranslateEntityAction.ts b/src/quest_editor/actions/TranslateEntityAction.ts index c8f002e0..78f2ccf4 100644 --- a/src/quest_editor/actions/TranslateEntityAction.ts +++ b/src/quest_editor/actions/TranslateEntityAction.ts @@ -20,6 +20,8 @@ export class TranslateEntityAction implements Action { } undo(): void { + quest_editor_store.set_selected_entity(this.entity); + if (this.world) { this.entity.set_world_position(this.old_position); } else { @@ -29,11 +31,11 @@ export class TranslateEntityAction implements Action { if (this.old_section) { this.entity.set_section(this.old_section); } - - quest_editor_store.set_selected_entity(this.entity); } redo(): void { + quest_editor_store.set_selected_entity(this.entity); + if (this.world) { this.entity.set_world_position(this.new_position); } else { @@ -43,7 +45,5 @@ export class TranslateEntityAction implements Action { if (this.new_section) { this.entity.set_section(this.new_section); } - - quest_editor_store.set_selected_entity(this.entity); } }