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

[bugfix] Update selection box on entityupdate only if it's the selected entity #733

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

vincentfretin
Copy link
Contributor

This fixes an error when using undo with unselected entity so when inspector.selectedEntity can be undefined.

@vincentfretin vincentfretin changed the title Update selection box on entityupdate only if it's the selected entity [bugfix] Update selection box on entityupdate only if it's the selected entity Jul 16, 2024
@vincentfretin
Copy link
Contributor Author

This is a required change for undo feature @dmarcos
The condition is similar to the other entityupdate listener we have here

Events.on('entityupdate', (detail) => {
const object = detail.entity.object3D;
if (inspector.selected === object) {

@dmarcos
Copy link
Member

dmarcos commented Jul 18, 2024

Thanks so much!

@dmarcos dmarcos merged commit 519b74d into aframevr:master Jul 18, 2024
1 check passed
@vincentfretin vincentfretin deleted the fix-undo-unselected-entity branch July 19, 2024 08:52
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.

2 participants