Skip to content

Commit 2a320a9

Browse files
plugins/videostream/VideoStream: Don't create marks on lat/lon zero.
1 parent 0eebcac commit 2a320a9

File tree

1 file changed

+6
-0
lines changed
  • plugins-dev/videostream/src/java/pt/lsts/neptus/plugins/videostream

1 file changed

+6
-0
lines changed

plugins-dev/videostream/src/java/pt/lsts/neptus/plugins/videostream/VideoStream.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ public void mouseClicked(MouseEvent e) {
506506
double y = height - e.getY();
507507
mouseLoc = new Point2D.Double((x / width - 0.5) * 2, (y / height - 0.5) * 2);
508508
LocationType loc = camFov.getLookAt(mouseLoc.getX(), mouseLoc.getY());
509+
loc.convertToAbsoluteLatLonDepth();
509510
String id = placeLocationOnMap(loc);
510511
snap = new StoredSnapshot(id, loc, e.getPoint(), onScreenImage, new Date());
511512
snap.setCamFov(camFov);
@@ -893,6 +894,11 @@ private String placeLocationOnMap(LocationType loc) {
893894
long timestamp = System.currentTimeMillis();
894895
String id = I18n.text("Snap") + "-" + frameTagID + "-" + timestampToReadableHoursString(timestamp);
895896

897+
if (loc.equals(LocationType.ABSOLUTE_ZERO)) {
898+
// Don't create map elements on lat/lon zero
899+
return id;
900+
}
901+
896902
AbstractElement elems[] = MapGroup.getMapGroupInstance(getConsole().getMission()).getMapObjectsByID(id);
897903

898904
while (elems.length > 0) {

0 commit comments

Comments
 (0)