Skip to content

Commit b84bac9

Browse files
committed
Only refresh tilesets/overlays using the same server.
1 parent be61321 commit b84bac9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Source/CesiumEditor/Private/SelectCesiumIonToken.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,6 @@ SelectCesiumIonToken::UseOrCreate(std::shared_ptr<CesiumIonSession> pSession) {
457457
if (response.value) {
458458
pSession->invalidateProjectDefaultTokenDetails();
459459

460-
const UCesiumRuntimeSettings* pSettings =
461-
GetDefault<UCesiumRuntimeSettings>();
462-
463460
UCesiumIonServer* pServer = pPanel->_pServer.Get();
464461

465462
FScopedTransaction transaction(
@@ -475,7 +472,8 @@ SelectCesiumIonToken::UseOrCreate(std::shared_ptr<CesiumIonSession> pSession) {
475472
UWorld* pWorld = GEditor->GetEditorWorldContext().World();
476473
for (auto it = TActorIterator<ACesium3DTileset>(pWorld); it; ++it) {
477474
if (it->GetTilesetSource() == ETilesetSource::FromCesiumIon &&
478-
it->GetIonAccessToken().IsEmpty()) {
475+
it->GetIonAccessToken().IsEmpty() &&
476+
it->GetCesiumIonServer() == pServer) {
479477
it->RefreshTileset();
480478
} else {
481479
// Tileset itself does not need to be refreshed, but maybe some
@@ -484,7 +482,8 @@ SelectCesiumIonToken::UseOrCreate(std::shared_ptr<CesiumIonSession> pSession) {
484482
it->GetComponents<UCesiumIonRasterOverlay>(rasterOverlays);
485483

486484
for (UCesiumIonRasterOverlay* pOverlay : rasterOverlays) {
487-
if (pOverlay->IonAccessToken.IsEmpty()) {
485+
if (pOverlay->IonAccessToken.IsEmpty() &&
486+
pOverlay->CesiumIonServer == pServer) {
488487
pOverlay->Refresh();
489488
}
490489
}

0 commit comments

Comments
 (0)