Skip to content

Deleting an entity cannot be undone #48

@dannymcgee

Description

@dannymcgee

In "studio" mode, attempting to Undo the deletion of an entity doesn't seem to be working as expected.

Steps to reproduce

  1. In app.element.ts, ensure the <sts-viewer /> element is configured with objectId="sample-room.gltf"
  2. Start the wasm/web application with npx nx serve studio-frontend and open it in the browser with http://localhost:4200/?mode=studio
  3. Once loaded, select an object (e.g., the Wicker Basket) by clicking on it in the scene
  4. Press the Delete key on your keyboard
  5. After the object disappears, press Ctrl + Z on the keyboard to undo the previous action

Expected behavior

The deleted object reappears in the scene and in the hierarchy tree.

Actual behavior

Nothing seems to happen, the object remains deleted.

Additional notes

If you enter Debug Mode (Ctrl + `), press any of the + icons in the Space Editor UI and view the Change Chain while performing the steps above, it appears that the application is correctly recording the change when the Delete key is pressed and attempting to roll it back when Ctrl + Z is pressed, but for some reason the change is not correctly reverted.

Here is the code that currently handles the Selection::Delete event and records the change with Space Editor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions