Issue #1001 synchronize paint with add.
Former-commit-id:2c9737ca5c
[formerly2c9737ca5c
[formerly 825c08e6ce89b0c4b042c9e85f7abbc7b9a675ef]] Former-commit-id:798d26e954
Former-commit-id:e9cde98072
This commit is contained in:
parent
5dc36127da
commit
db95e6621b
1 changed files with 45 additions and 43 deletions
|
@ -359,57 +359,59 @@ public class LightningResource extends
|
||||||
.get(this.lastPaintedTime);
|
.get(this.lastPaintedTime);
|
||||||
|
|
||||||
if (cacheObject != null) {
|
if (cacheObject != null) {
|
||||||
LightningFrame bundle = cacheObject.getObjectAsync();
|
synchronized (cacheObject.getMetadata()) {
|
||||||
if (bundle == null) {
|
LightningFrame bundle = cacheObject.getObjectAsync();
|
||||||
needsUpdate = true;
|
if (bundle == null) {
|
||||||
issueRefresh();
|
needsUpdate = true;
|
||||||
} else {
|
issueRefresh();
|
||||||
if (needsUpdate) {
|
} else {
|
||||||
needsUpdate = false;
|
if (needsUpdate) {
|
||||||
currNegList = new ArrayList<double[]>(
|
needsUpdate = false;
|
||||||
bundle.posLatLonList.size());
|
currNegList = new ArrayList<double[]>(
|
||||||
currPosList = new ArrayList<double[]>(
|
bundle.posLatLonList.size());
|
||||||
bundle.negLatLonList.size());
|
currPosList = new ArrayList<double[]>(
|
||||||
|
bundle.negLatLonList.size());
|
||||||
|
|
||||||
|
if (resourceData.isHandlingPositiveStrikes()) {
|
||||||
|
for (double[] pos : bundle.posLatLonList) {
|
||||||
|
currPosList.add(descriptor.worldToPixel(pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (resourceData.isHandlingNegativeStrikes()) {
|
||||||
|
for (double[] neg : bundle.negLatLonList) {
|
||||||
|
currNegList.add(descriptor.worldToPixel(neg));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (resourceData.isHandlingPositiveStrikes()) {
|
if (resourceData.isHandlingPositiveStrikes()) {
|
||||||
for (double[] pos : bundle.posLatLonList) {
|
List<double[]> positive = new ArrayList<double[]>(
|
||||||
currPosList.add(descriptor.worldToPixel(pos));
|
currPosList.size());
|
||||||
|
for (double[] pos : currPosList) {
|
||||||
|
if (extent.contains(pos)) {
|
||||||
|
positive.add(pos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
posCount = positive.size();
|
||||||
|
|
||||||
|
target.drawPoints(positive, color, PointStyle.CROSS,
|
||||||
|
magnification);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resourceData.isHandlingNegativeStrikes()) {
|
if (resourceData.isHandlingNegativeStrikes()) {
|
||||||
for (double[] neg : bundle.negLatLonList) {
|
List<double[]> negative = new ArrayList<double[]>(
|
||||||
currNegList.add(descriptor.worldToPixel(neg));
|
currPosList.size());
|
||||||
|
for (double[] neg : currNegList) {
|
||||||
|
if (extent.contains(neg)) {
|
||||||
|
negative.add(neg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
negCount = negative.size();
|
||||||
|
|
||||||
|
target.drawPoints(negative, color, PointStyle.DASH,
|
||||||
|
magnification);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resourceData.isHandlingPositiveStrikes()) {
|
|
||||||
List<double[]> positive = new ArrayList<double[]>(
|
|
||||||
currPosList.size());
|
|
||||||
for (double[] pos : currPosList) {
|
|
||||||
if (extent.contains(pos)) {
|
|
||||||
positive.add(pos);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
posCount = positive.size();
|
|
||||||
|
|
||||||
target.drawPoints(positive, color, PointStyle.CROSS,
|
|
||||||
magnification);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resourceData.isHandlingNegativeStrikes()) {
|
|
||||||
List<double[]> negative = new ArrayList<double[]>(
|
|
||||||
currPosList.size());
|
|
||||||
for (double[] neg : currNegList) {
|
|
||||||
if (extent.contains(neg)) {
|
|
||||||
negative.add(neg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
negCount = negative.size();
|
|
||||||
|
|
||||||
target.drawPoints(negative, color, PointStyle.DASH,
|
|
||||||
magnification);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue