diff --git a/GCSViews/FlightPlanner.cs b/GCSViews/FlightPlanner.cs index 59e60a240a..a2c3b1ab1e 100644 --- a/GCSViews/FlightPlanner.cs +++ b/GCSViews/FlightPlanner.cs @@ -2940,7 +2940,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)