message: State management when level added to layer.
diff: @@ -264,6 +264,8 @@ void ACesiumGeoreference::_updateCesiumSubLevels() {
  TArray<int32> newSubLevels;
  TArray<int32> missingSubLevels;
  + bool checkForNewCurrentLevel = false;
  +
  // Find new sub-levels that we don't know about on the Cesium side.
  for (int32 i = 0; i < allLevels.Num(); ++i) {
  const FWorldCompositionTile& level = allLevels[i];
  @@ -277,10 +279,23 @@ void ACesiumGeoreference::_updateCesiumSubLevels() {
  });
  if (pFound) {
  - pFound->CanBeEnabled = !level.Info.Layer.DistanceStreamingEnabled;
  + bool newCanBeEnabled = !level.Info.Layer.DistanceStreamingEnabled;
  + if (pFound->CanBeEnabled != newCanBeEnabled) {
  + pFound->CanBeEnabled = newCanBeEnabled;
  +
  + // If this level can't be enabled, make sure it's not enabled.
  if (!pFound->CanBeEnabled) {
  pFound->Enabled = false;
  }
  +
  + if (newCanBeEnabled) {
  + // This level existed before but is newly enable-able, probably
  + // because it was just added to the right streaming layer. If it also
  + // happens to be the current level, we'll want to immediately hide
  + // other levels. Set a flag to do that later.
  + checkForNewCurrentLevel = true;
  + }
  + }
  } else {
  newSubLevels.Add(i);
  }
  @@ -327,6 +342,10 @@ void ACesiumGeoreference::_updateCesiumSubLevels() {
  canBeEnabled});
  }
  }
  +
  + if (checkForNewCurrentLevel) {
  + this->_onNewCurrentLevel();
  + }
  }
  #endif
  