diff --git a/GCSViews/FlightPlanner.cs b/GCSViews/FlightPlanner.cs index 5b3f6e9d81..a89c1b8551 100644 --- a/GCSViews/FlightPlanner.cs +++ b/GCSViews/FlightPlanner.cs @@ -2979,7 +2979,16 @@ private Locationwp DataViewtoLocationwp(int a) false); } - temp.p1 = float.Parse(Commands.Rows[a].Cells[Param1.Index].Value.ToString()); + if (Commands.Rows[a].Cells[Command.Index].Value.Equals("WAYPOINT")) + { + temp.p1 = float.Parse(Commands.Rows[a].Cells[Param1.Index].Value.ToString()); + if (temp.p1 < 0) + { + temp.p1 = 0; + DataGridViewTextBoxCell cell = Commands.Rows[a].Cells[Param1.Index] as DataGridViewTextBoxCell; + cell.Value = temp.p1; + } + } temp.alt = (float)