ASM #513 - Maps loaded before opening WarnGen not retained when WarnGen is closed.
Change-Id: I6d3a180d850060483742130c1550ac88f133d6e6 Former-commit-id:065557f582
[formerly27789e1601
] [formerly7004d99fb8
] [formerly065557f582
[formerly27789e1601
] [formerly7004d99fb8
] [formerly3a340e084c
[formerly7004d99fb8
[formerly 7b7a2fcb393b09b9f0cb2077f1603410edcc9dab]]]] Former-commit-id:3a340e084c
Former-commit-id:93411f0a7f
[formerlyf9bc1deab4
] [formerly 8fb3c798d0ba03ded3aa7bcf584d55ff28f45816 [formerly7ca228ca84
]] Former-commit-id: b48e80dc66dd0ef694bdb08247b011e550f89abe [formerlye39b6b0c6f
] Former-commit-id:a5e993422b
This commit is contained in:
parent
393c398224
commit
5d399eb63c
1 changed files with 12 additions and 1 deletions
|
@ -212,6 +212,7 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* 04/23/2014 DR 16356 Qinglu Lin Updated initializeState() and added reset().
|
||||
* 04/28,2014 3033 jsanchez Properly handled back up configuration (*.xml) files. Set backupSite to null when backup site is not selected.
|
||||
* 05/16/2014 DR 17365 D. Friedman Check if moved vertex results in polygon valid in both lat/lon and local coordinates.
|
||||
* 06/23/2014 DR16322 m.gamazaychikov Fix Warngen unloading previously loaded maps.
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
|
@ -352,11 +353,14 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
|
||||
private Set<String> mapsToLoad;
|
||||
|
||||
private Set<String> preloadedMaps;
|
||||
|
||||
private final MapManager manager;
|
||||
|
||||
public CustomMaps() {
|
||||
super("Loading WarnGen Maps");
|
||||
manager = MapManager.getInstance(descriptor);
|
||||
preloadedMaps=new HashSet<String>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -373,7 +377,9 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
|
||||
if (toLoad != null) {
|
||||
for (String loaded : customMaps) {
|
||||
manager.unloadMap(loaded);
|
||||
if (!preloadedMaps.contains(loaded)) {
|
||||
manager.unloadMap(loaded);
|
||||
}
|
||||
}
|
||||
|
||||
for (String load : toLoad) {
|
||||
|
@ -389,6 +395,11 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
}
|
||||
|
||||
public void loadCustomMaps(Collection<String> maps) {
|
||||
for (String map : maps) {
|
||||
if (manager.isMapLoaded(map)) {
|
||||
preloadedMaps.add(map);
|
||||
}
|
||||
}
|
||||
synchronized (this) {
|
||||
mapsToLoad = new HashSet<String>(maps);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue