Skip to content

Commit

Permalink
Fix missing default color
Browse files Browse the repository at this point in the history
  • Loading branch information
EosBandi authored and meee1 committed Nov 12, 2024
1 parent 5f4296e commit 31e8733
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions GCSViews/FlightPlanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5176,9 +5176,15 @@ private void processKML(Element Element, Document root = null)
{
if (((Style)style).Line != null)
{
int color = ((Style)style).Line.Color.Value.Abgr;
int color;
if (((Style)style).Line.Color != null)
{
color = ((Style)style).Line.Color.Value.Abgr;
color = (int)((color & 0xFF00FF00) | ((color & 0x00FF0000) >> 16) | ((color & 0x000000FF) << 16));

}
else color = Color.White.ToArgb();
// convert color from ABGR to ARGB
color = (int)((color & 0xFF00FF00) | ((color & 0x00FF0000) >> 16) | ((color & 0x000000FF) << 16));

if (((Style)style).Line.Width != null)
{
Expand Down

0 comments on commit 31e8733

Please sign in to comment.