Merge "Issue #1380 fix kml handling of uninitialized coor bars." into development

Former-commit-id: bf6c3ef4d5 [formerly 5bb646638d] [formerly 2248bf0f53] [formerly bf6c3ef4d5 [formerly 5bb646638d] [formerly 2248bf0f53] [formerly 50f2d6ab93 [formerly 2248bf0f53 [formerly 4187da110efb8e261aaa92c2b537e461df01ecc1]]]]
Former-commit-id: 50f2d6ab93
Former-commit-id: 8681aa0f62 [formerly 6e65a592f4] [formerly 2d5d972ec19feb8d5eeb7135b547a6af6d9a5109 [formerly 75a74fe4bc]]
Former-commit-id: 608168efa8e1a3ca3b6b78c789f2229f515bb838 [formerly f408803e8c]
Former-commit-id: 4fc5e57dfb
This commit is contained in:
Richard Peter 2012-12-04 10:37:23 -06:00 committed by Gerrit Code Review
commit d2eb6cea46

View file

@ -304,7 +304,6 @@ public class KmlExportJob extends Job {
lastIndex = Math.min(lastIndex, descriptor.getNumberOfFrames());
rscmonitor.beginTask("Saving " + rsc.getName(), lastIndex
- startIndex);
addColorMap(resourceOut, display.getBackgroundColor(), rsc);
DataTime[] times = descriptor.getFramesInfo().getTimeMap()
.get(rsc);
if ((times == null || times.length == 0)
@ -352,6 +351,7 @@ public class KmlExportJob extends Job {
return;
}
}
addColorMap(resourceOut, display.getBackgroundColor(), rsc);
}
rp.getProperties().setVisible(false);
if (options.isPreserveVisibility() && !visibility.get(c)) {
@ -550,6 +550,10 @@ public class KmlExportJob extends Job {
xAnchor = Math.min(1, cap.getResourceIndex());
}
IColorMap colorMap = parameters.getColorMap();
if (colorMap == null) {
// the resource isn't actually using it's color bar.
return;
}
BufferedImage bi = new BufferedImage(colorMap.getSize() * 2, 25,
BufferedImage.TYPE_INT_RGB);
Graphics graphics = bi.getGraphics();