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

Wps results fix #6826

Merged
merged 8 commits into from
Aug 7, 2023
6 changes: 5 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Change Log

#### next release (8.3.2)
#### next release (8.3.3)

- Fixed a bug when restoring timefilter from a share link having more than one imagery item with the same base URL (but different layer names).
- [The next improvement]

#### 8.3.2

- Fix WPS duplicate display of analysis results when loaded through a share URL

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the correct next release for this change is 8.3.2 (so after the timefilter bug fix).

terriajs/CHANGES.md

Lines 3 to 7 in 15d4686

#### next release (8.3.2)
- Fixed a bug when restoring timefilter from a share link having more than one imagery item with the same base URL (but different layer names).
- [The next improvement]

#### 8.3.1 - 2023-06-29

- **Breaking changes:**
Expand Down
5 changes: 4 additions & 1 deletion lib/Models/Terria.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,10 @@ export default class Terria {
while (true) {
const model = newItemsRaw.shift();
if (model) {
await this.pushAndLoadMapItems(model, newItems, errors);
// check if model is already in the newItems list by uniqueId
if (!newItems.find((item) => item.uniqueId === model.uniqueId)) {
await this.pushAndLoadMapItems(model, newItems, errors);
}
sixlighthouses marked this conversation as resolved.
Show resolved Hide resolved
} else {
break;
}
Expand Down
7 changes: 6 additions & 1 deletion lib/Models/Workbench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ export default class Workbench {
return this._items.map(dereferenceModel);
}
set items(items: readonly BaseModel[]) {
this._items.spliceWithArray(0, this._items.length, items.slice());
const setItems = new Set(items);
this._items.spliceWithArray(
sixlighthouses marked this conversation as resolved.
Show resolved Hide resolved
0,
this._items.length,
Array.from(setItems).slice()
);
}

/**
Expand Down
Loading