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

Geometry not always obeying Entity.show #2756

Merged
merged 4 commits into from
May 28, 2015
Merged

Geometry not always obeying Entity.show #2756

merged 4 commits into from
May 28, 2015

Conversation

mramato
Copy link
Contributor

@mramato mramato commented May 28, 2015

This fixes two issues. First is the simple case where Entity.show is set to false at the time entity geometry gets created but the geometry would still show up (because none of the geometry updaters were checking for entity.isShowing at creation time. Second was the current value of geometry attributes being lost when entities were re-batched when new geometry was added. This is because the instance attributes in the original geometry are not the same instance as the attributes on the created primitive. Now we loop through current attribute values and transfer them to the new primitive.

In addition to new tests, there' s also a Sandcastle example in #2686 that can reproduce the problem.

Fixes #2686

1. Geometry created by the Entity API was defaulting its show attribute to
true, even when `entity.show` was false.

2. When new Entity geometry was added to an existing batch, the current
show attribute was not properly migrated from the old Primitive instance to
the new one.
@pjcozzi
Copy link
Contributor

pjcozzi commented May 28, 2015

Looks good.

pjcozzi added a commit that referenced this pull request May 28, 2015
@pjcozzi pjcozzi merged commit fc50232 into master May 28, 2015
@pjcozzi pjcozzi deleted the confused-geometry branch May 28, 2015 18:50
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.

Adding new entity may break entity.show
2 participants