Skip to content

Commit

Permalink
Fix bug in Flarm display objects on moving map: max 10 objects should…
Browse files Browse the repository at this point in the history
… be accounted only when really painted, depending if they are really on the current map considering zoom and location.
  • Loading branch information
pventafridda committed Dec 5, 2016
1 parent 2f7b7f9 commit 972a50c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Common/Source/Draw/LKDrawFLARMTraffic.cpp
Expand Up @@ -93,14 +93,20 @@ static int iRectangleSize = 4;

if ( (DrawInfo.FLARM_Traffic[i].ID !=0) && (DrawInfo.FLARM_Traffic[i].Status != LKT_ZOMBIE) ) {

painted++;

double target_lon;
double target_lat;

target_lon = DrawInfo.FLARM_Traffic[i].Longitude;
target_lat = DrawInfo.FLARM_Traffic[i].Latitude;

if (!PointVisible(target_lon, target_lat)) {
// StartupStore(_T("... This traffic is not visible on map with current zoom%s"),NEWLINE);
continue;
}

painted++;

#if (0) // No scaling, wrong
if ((EnableFLARMMap==2)&&(scalefact>1.0)) {

Expand Down

0 comments on commit 972a50c

Please sign in to comment.