Skip to content

Commit

Permalink
applyStyle doesn't need an if guard
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrgags committed Jan 26, 2022
1 parent 7323aa9 commit f6df243
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Source/Scene/ModelExperimental/ModelExperimental.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,13 +735,9 @@ function updateFeatureTableId(model) {

if (defined(featureMetadata) && featureMetadata.propertyTableCount > 0) {
model.featureTableId = selectFeatureTableId(components, model);

if (defined(model._style)) {
// Re-apply the style to reflect the new feature ID table
model.applyStyle(model._style);
} else {
model.resetDrawCommands();
}
// Re-apply the style to reflect the new feature ID table.
// This in turn triggers a rebuild of the draw commands.
model.applyStyle(model._style);
}
}

Expand Down

0 comments on commit f6df243

Please sign in to comment.