Skip to content

Commit

Permalink
Add fix/note about updating dirty flag when all layers are deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanfranklin committed Mar 30, 2021
1 parent e69ead9 commit b087951
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/services/geo-data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,14 @@ export class GeoDataService {
map((items: Array<TileServer>) =>
items.filter((item: TileServer) =>
item.id !== tileServerId)),
).subscribe((results) => {
).subscribe((results) => {

if (!Array.isArray(results) || !results.length) {
// if empty, then we should set dirty flag to false
// (see https://jira.tacc.utexas.edu/browse/DES-1910 for additional improvement)
this._dirtyTileOptions.next(false);
}

this._tileServers.next(results);
this.notificationsService.showSuccessToast('Tile layer deleted!');
});
Expand Down

0 comments on commit b087951

Please sign in to comment.