From aa6d5e3787592fc9b7a546f1ec679e0b8e99221d Mon Sep 17 00:00:00 2001
From: Don Gagne <don@thegagnes.com>
Date: Sun, 21 Aug 2016 09:56:27 -0700
Subject: [PATCH] Fix starting point for first grid line

---
 src/MissionManager/SurveyMissionItem.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/MissionManager/SurveyMissionItem.cc b/src/MissionManager/SurveyMissionItem.cc
index f9406e6258..9a352600b5 100644
--- a/src/MissionManager/SurveyMissionItem.cc
+++ b/src/MissionManager/SurveyMissionItem.cc
@@ -538,8 +538,8 @@ void SurveyMissionItem::_gridGenerator(const QList<QPointF>& polygonPoints,  QLi
     // Create set of rotated parallel lines within the expanded bounding rect. Make the lines larger than the
     // bounding box to guarantee intersection.
     QList<QLineF> lineList;
-    float x = largeBoundRect.topLeft().x();
     float gridSpacing = _gridSpacingFact.rawValue().toDouble();
+    float x = largeBoundRect.topLeft().x() - (gridSpacing / 2);
     while (x < largeBoundRect.bottomRight().x()) {
         float yTop =    largeBoundRect.topLeft().y() - 100.0;
         float yBottom = largeBoundRect.bottomRight().y() + 100.0;
-- 
GitLab