Skip to content

Commit 31e8733

Browse files
EosBandimeee1
authored andcommitted
Fix missing default color
1 parent 5f4296e commit 31e8733

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

GCSViews/FlightPlanner.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5176,9 +5176,15 @@ private void processKML(Element Element, Document root = null)
51765176
{
51775177
if (((Style)style).Line != null)
51785178
{
5179-
int color = ((Style)style).Line.Color.Value.Abgr;
5179+
int color;
5180+
if (((Style)style).Line.Color != null)
5181+
{
5182+
color = ((Style)style).Line.Color.Value.Abgr;
5183+
color = (int)((color & 0xFF00FF00) | ((color & 0x00FF0000) >> 16) | ((color & 0x000000FF) << 16));
5184+
5185+
}
5186+
else color = Color.White.ToArgb();
51805187
// convert color from ABGR to ARGB
5181-
color = (int)((color & 0xFF00FF00) | ((color & 0x00FF0000) >> 16) | ((color & 0x000000FF) << 16));
51825188

51835189
if (((Style)style).Line.Width != null)
51845190
{

0 commit comments

Comments
 (0)