Skip to content

Commit

Permalink
Merge pull request #955 from CesiumGS/latent-children-fix
Browse files Browse the repository at this point in the history
setMightHaveLatentChildren(false) even if a tile has real children.
  • Loading branch information
kring authored Oct 1, 2024
2 parents 21844ff + ec2186c commit d8c2c24
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Cesium3DTilesSelection/src/TilesetContentManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,11 @@ void TilesetContentManager::updateTileContent(
void TilesetContentManager::createLatentChildrenIfNecessary(
Tile& tile,
const TilesetOptions& tilesetOptions) {
if (tile.getChildren().empty() && tile.getMightHaveLatentChildren()) {
if (!tile.getMightHaveLatentChildren())
return;

// If this tile has no children yet, attempt to create them.
if (tile.getChildren().empty()) {
TileChildrenResult childrenResult =
this->_pLoader->createTileChildren(tile, tilesetOptions.ellipsoid);
if (childrenResult.state == TileLoadResultState::Success) {
Expand All @@ -1086,6 +1090,9 @@ void TilesetContentManager::createLatentChildrenIfNecessary(
bool mightStillHaveLatentChildren =
childrenResult.state == TileLoadResultState::RetryLater;
tile.setMightHaveLatentChildren(mightStillHaveLatentChildren);
} else {
// A tile with real children can't have latent children.
tile.setMightHaveLatentChildren(false);
}
}

Expand Down

0 comments on commit d8c2c24

Please sign in to comment.