From 0874516f9476d7fd4006b91bba6c753d91891971 Mon Sep 17 00:00:00 2001 From: Pierre TILAK Date: Tue, 17 Sep 2019 17:02:31 +1200 Subject: [PATCH] Rename i in VisualItemIndex --- src/MissionManager/MissionController.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MissionManager/MissionController.cc b/src/MissionManager/MissionController.cc index 33c137852..375b51801 100644 --- a/src/MissionManager/MissionController.cc +++ b/src/MissionManager/MissionController.cc @@ -412,8 +412,8 @@ int MissionController::insertComplexMissionItem(QString itemName, QGeoCoordinate // If the ComplexMissionItem is inserted first, add a TakeOff SimpleMissionItem if (_visualItems->count() == 1 && (_controllerVehicle->fixedWing() || _controllerVehicle->vtol() || _controllerVehicle->multiRotor())) { - insertSimpleMissionItem(mapCenterCoordinate, i); - i++; + insertSimpleMissionItem(mapCenterCoordinate, visualItemIndex); + visualItemIndex++; } int sequenceNumber = _nextSequenceNumber(); -- 2.22.0