#2340 Update map plotting to address glitchy behavior when selecting entities and histories. (#2341)

Co-authored-by: denny <dennis.sheirer@gmail.com>
This commit is contained in:
Denny Sheirer
2025-12-26 05:40:57 -05:00
committed by GitHub
parent b83f77c7c6
commit a2509554db
6 changed files with 160 additions and 233 deletions

View File

@@ -1,6 +1,6 @@
/*
* *****************************************************************************
* Copyright (C) 2014-2024 Dennis Sheirer
* Copyright (C) 2014-2025 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -80,9 +80,9 @@ public class PlottableEntityRenderer
*/
public void paintPlottableEntity(Graphics2D g, JXMapViewer viewer, PlottableEntityHistory entity, boolean antiAliasing)
{
List<TimestampedGeoPosition> locationHistory = entity.getLocationHistory();
List<TimestampedGeoPosition> locationHistory = entity.getTrackHistoryModel().getTrackHistory();
if(!locationHistory.isEmpty() && locationHistory.get(locationHistory.size() - 1).isValid())
if(!locationHistory.isEmpty() && locationHistory.getLast().isValid())
{
Graphics2D graphics = (Graphics2D)g.create();
@@ -171,7 +171,7 @@ public class PlottableEntityRenderer
*/
private void paintRoute(Graphics2D graphics, JXMapViewer viewer, PlottableEntityHistory entity, Color color)
{
List<TimestampedGeoPosition> locations = entity.getLocationHistory();
List<TimestampedGeoPosition> locations = entity.getTrackHistoryModel().getTrackHistory();
if(!locations.isEmpty())
{