Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
df842d09
Commit
df842d09
authored
Oct 30, 2019
by
Pierre TILAK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use current selected item as index for insert
parent
bffdc8d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
PlanView.qml
src/PlanView/PlanView.qml
+16
-2
No files found.
src/PlanView/PlanView.qml
View file @
df842d09
...
@@ -65,7 +65,14 @@ Item {
...
@@ -65,7 +65,14 @@ Item {
coordinate
.
latitude
=
coordinate
.
latitude
.
toFixed
(
_decimalPlaces
)
coordinate
.
latitude
=
coordinate
.
latitude
.
toFixed
(
_decimalPlaces
)
coordinate
.
longitude
=
coordinate
.
longitude
.
toFixed
(
_decimalPlaces
)
coordinate
.
longitude
=
coordinate
.
longitude
.
toFixed
(
_decimalPlaces
)
coordinate
.
altitude
=
coordinate
.
altitude
.
toFixed
(
_decimalPlaces
)
coordinate
.
altitude
=
coordinate
.
altitude
.
toFixed
(
_decimalPlaces
)
insertComplexMissionItem
(
complexItemName
,
coordinate
,
_missionController
.
visualItems
.
count
)
var
next_index
=
_missionController
.
visualItemIndexFromSequenceNumber
(
_missionController
.
currentPlanViewIndex
)
+
1
if
(
next_index
==
1
&&
_missionController
.
visualItems
.
count
>
1
){
console
.
log
(
next_index
,
_missionController
.
visualItems
.
count
)
insertComplexMissionItem
(
complexItemName
,
coordinate
,
next_index
+
1
)
}
else
if
(
next_index
<=
_missionController
.
visualItems
.
count
){
insertComplexMissionItem
(
complexItemName
,
coordinate
,
next_index
)
}
}
}
function
insertComplexMissionItem
(
complexItemName
,
coordinate
,
index
)
{
function
insertComplexMissionItem
(
complexItemName
,
coordinate
,
index
)
{
...
@@ -468,7 +475,14 @@ Item {
...
@@ -468,7 +475,14 @@ Item {
switch
(
_editingLayer
)
{
switch
(
_editingLayer
)
{
case
_layerMission
:
case
_layerMission
:
if
(
_addWaypointOnClick
)
{
if
(
_addWaypointOnClick
)
{
insertSimpleMissionItem
(
coordinate
,
_missionController
.
visualItems
.
count
)
var
next_index
=
_missionController
.
visualItemIndexFromSequenceNumber
(
_missionController
.
currentPlanViewIndex
)
+
1
if
(
next_index
==
1
&&
_missionController
.
visualItems
.
count
>
1
){
console
.
log
(
next_index
,
_missionController
.
visualItems
.
count
)
insertSimpleMissionItem
(
coordinate
,
next_index
+
1
)
}
else
if
(
next_index
<=
_missionController
.
visualItems
.
count
){
insertSimpleMissionItem
(
coordinate
,
next_index
)
}
}
else
if
(
_addROIOnClick
)
{
}
else
if
(
_addROIOnClick
)
{
_addROIOnClick
=
false
_addROIOnClick
=
false
insertROIMissionItem
(
coordinate
,
_missionController
.
visualItems
.
count
)
insertROIMissionItem
(
coordinate
,
_missionController
.
visualItems
.
count
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment