Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: Fixed SetGeometryCommand failed to UNDO/REDO #28361

Merged
merged 1 commit into from May 13, 2024

Conversation

ycw
Copy link
Contributor

@ycw ycw commented May 13, 2024

Related issue: #28345 ( issue 2 )

Issue: SetGeometryCommand failed to UNDO/REDO

Because it wrongly serializes oldGeometry as current object's geometry.

To reproduce:

  1. Go to https://threejs.org/editor/
  2. In SETTINGS tab, enable persistent in History section
  3. Add a Box
  4. Select Box in outliner, then in GEOMETRY tab, update Width from 1 to 2
  5. Refresh the page
  6. Press Edit>Undo
  7. You should see the box's width is of 2, not 1

Solution (This PR)

Fixed that by serializing the this.oldGeometry.toJSON() instead

@ycw ycw mentioned this pull request May 13, 2024
4 tasks
@Mugen87 Mugen87 added this to the r165 milestone May 13, 2024
@Mugen87 Mugen87 merged commit 285753a into mrdoob:dev May 13, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants