Issue #2227 Fix issue with swapping of melting layer product.
Change-Id: Ibb67b53ba29f5a24714e2852602fd0b54d811b6d Former-commit-id:3c0eb24d51
[formerly91afb50333
] [formerly3c0eb24d51
[formerly91afb50333
] [formerlyb308e86105
[formerly fc6ff0d7e60d82c8ca0d67cf96f26cde23ad0f02]]] Former-commit-id:b308e86105
Former-commit-id:1acd38ced6
[formerly855671b490
] Former-commit-id:32bdbdab0f
This commit is contained in:
parent
0ad4093393
commit
bc3fc824d3
1 changed files with 6 additions and 3 deletions
|
@ -268,6 +268,7 @@ public class RadarMLResource extends RadarGraphicsResource {
|
|||
public void remove(DataTime dataTime) {
|
||||
synchronized (shapes) {
|
||||
disposeShapeMap(shapes.get(dataTime));
|
||||
shapes.remove(dataTime);
|
||||
}
|
||||
super.remove(dataTime);
|
||||
}
|
||||
|
@ -292,7 +293,7 @@ public class RadarMLResource extends RadarGraphicsResource {
|
|||
Map<Integer, IWireframeShape> shapeMap = null;
|
||||
synchronized (shapes) {
|
||||
shapeMap = shapes.get(time);
|
||||
if (shapeMap == null || refresh == true) {
|
||||
if (shapeMap == null || refresh == true && time != null) {
|
||||
if (shapeMap != null) {
|
||||
disposeShapeMap(shapeMap);
|
||||
}
|
||||
|
@ -420,8 +421,10 @@ public class RadarMLResource extends RadarGraphicsResource {
|
|||
* Disposes of the internal shapes, passing in the shapes you want disposed.
|
||||
*/
|
||||
private void disposeShapeMap(Map<Integer, IWireframeShape> shapeMap) {
|
||||
for (IWireframeShape shape : shapeMap.values()) {
|
||||
shape.dispose();
|
||||
if (shapeMap != null) {
|
||||
for (IWireframeShape shape : shapeMap.values()) {
|
||||
shape.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue