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
98db1bee
Commit
98db1bee
authored
Apr 18, 2017
by
Don Gagne
Committed by
GitHub
Apr 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5009 from DonLakeFlyer/Fixes
Fixes
parents
83b22d62
464b7157
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
24 deletions
+30
-24
MissionItemEditor.qml
src/PlanView/MissionItemEditor.qml
+18
-10
PlanToolBar.qml
src/PlanView/PlanToolBar.qml
+1
-2
PlanView.qml
src/PlanView/PlanView.qml
+11
-12
No files found.
src/PlanView/MissionItemEditor.qml
View file @
98db1bee
...
...
@@ -33,6 +33,7 @@ Rectangle {
property
color
_outerTextColor
:
_currentItem
?
qgcPal
.
primaryButtonText
:
qgcPal
.
text
property
bool
_noMissionItemsAdded
:
ListView
.
view
.
model
.
count
===
1
property
real
_sectionSpacer
:
ScreenTools
.
defaultFontPixelWidth
/
2
// spacing between section headings
property
bool
_singleComplexItem
:
missionController
.
complexMissionItemNames
.
length
===
1
readonly
property
real
_editFieldWidth
:
Math
.
min
(
width
-
_margin
*
2
,
ScreenTools
.
defaultFontPixelWidth
*
12
)
readonly
property
real
_margin
:
ScreenTools
.
defaultFontPixelWidth
/
2
...
...
@@ -63,7 +64,7 @@ Rectangle {
anchors.verticalCenter
:
commandPicker
.
verticalCenter
anchors.leftMargin
:
_margin
anchors.left
:
parent
.
left
text
:
missionItem
.
abbreviation
.
charAt
(
0
)
text
:
missionItem
.
homePosition
?
"
H
"
:
missionItem
.
sequenceNumber
color
:
_outerTextColor
}
...
...
@@ -97,20 +98,16 @@ Rectangle {
onTriggered
:
insertWaypoint
()
}
MenuItem
{
text
:
qsTr
(
"
Delete
"
)
onTriggered
:
remove
()
}
Menu
{
id
:
normalPatternMenu
title
:
qsTr
(
"
Insert pattern
"
)
id
:
patternMenu
title
:
qsTr
(
"
Insert pattern
"
)
visible
:
!
_singleComplexItem
Instantiator
{
model
:
missionController
.
complexMissionItemNames
onObjectAdded
:
normalP
atternMenu
.
insertItem
(
index
,
object
)
onObjectRemoved
:
normalP
atternMenu
.
removeItem
(
object
)
onObjectAdded
:
p
atternMenu
.
insertItem
(
index
,
object
)
onObjectRemoved
:
p
atternMenu
.
removeItem
(
object
)
MenuItem
{
text
:
modelData
...
...
@@ -119,6 +116,17 @@ Rectangle {
}
}
MenuItem
{
text
:
qsTr
(
"
Insert
"
)
+
missionController
.
complexMissionItemNames
[
0
]
visible
:
_singleComplexItem
onTriggered
:
insertComplexItem
(
missionController
.
complexMissionItemNames
[
0
])
}
MenuItem
{
text
:
qsTr
(
"
Delete
"
)
onTriggered
:
remove
()
}
MenuItem
{
text
:
qsTr
(
"
Change command...
"
)
onTriggered
:
commandPicker
.
clicked
()
...
...
src/PlanView/PlanToolBar.qml
View file @
98db1bee
...
...
@@ -111,7 +111,6 @@ Rectangle {
}
}
RowLayout
{
anchors.top
:
parent
.
top
anchors.bottom
:
parent
.
bottom
...
...
@@ -247,7 +246,7 @@ Rectangle {
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
missionController
?
(
missionController
.
dirty
?
qsTr
(
"
Upload Required
"
)
:
qsTr
(
"
Upload
"
))
:
""
enabled
:
_activeVehicle
enabled
:
_activeVehicle
&&
!
missionController
.
syncInProgress
visible
:
_activeVehicle
&&
_manualUpload
onClicked
:
missionController
.
upload
()
...
...
src/PlanView/PlanView.qml
View file @
98db1bee
...
...
@@ -76,7 +76,7 @@ QGCView {
function
insertComplexMissionItem
(
complexItemName
,
coordinate
,
index
)
{
var
sequenceNumber
=
missionController
.
insertComplexMissionItem
(
complexItemName
,
coordinate
,
index
)
setCurrentItem
(
sequenceNumber
)
setCurrentItem
(
sequenceNumber
,
true
)
}
property
bool
_firstMissionLoadComplete
:
false
...
...
@@ -168,7 +168,7 @@ QGCView {
Component.onCompleted
:
{
start
(
true
/* editMode */
)
setCurrentItem
(
0
)
setCurrentItem
(
0
,
true
)
}
function
_denyUpload
(
switchToFly
)
{
...
...
@@ -223,7 +223,7 @@ QGCView {
if
(
_visualItems
&&
_visualItems
.
count
!=
1
)
{
mapFitFunctions
.
fitMapViewportToMissionItems
()
}
setCurrentItem
(
0
)
setCurrentItem
(
0
,
true
)
}
}
...
...
@@ -305,8 +305,8 @@ QGCView {
/// Sets a new current mission item
/// @param sequenceNumber - index for new item, -1 to clear current item
function
setCurrentItem
(
sequenceNumber
)
{
if
(
sequenceNumber
!==
_currentMissionIndex
)
{
function
setCurrentItem
(
sequenceNumber
,
force
)
{
if
(
force
||
sequenceNumber
!==
_currentMissionIndex
)
{
_currentMissionItem
=
undefined
_currentMissionIndex
=
-
1
for
(
var
i
=
0
;
i
<
_visualItems
.
count
;
i
++
)
{
...
...
@@ -326,9 +326,8 @@ QGCView {
/// @param coordinate Location to insert item
/// @param index Insert item at this index
function
insertSimpleMissionItem
(
coordinate
,
index
)
{
setCurrentItem
(
-
1
)
var
sequenceNumber
=
missionController
.
insertSimpleMissionItem
(
coordinate
,
index
)
setCurrentItem
(
sequenceNumber
)
setCurrentItem
(
sequenceNumber
,
true
)
}
property
int
_moveDialogMissionItemIndex
...
...
@@ -347,7 +346,7 @@ QGCView {
onAcceptedForLoad
:
{
_syncDropDownController
.
loadFromFile
(
file
)
_syncDropDownController
.
fitViewportToItems
()
_currentMissionItem
=
_visualItems
.
get
(
0
)
setCurrentItem
(
0
,
true
)
close
()
}
}
...
...
@@ -506,7 +505,7 @@ QGCView {
delegate
:
MissionItemMapVisual
{
map
:
editorMap
onClicked
:
setCurrentItem
(
sequenceNumber
)
onClicked
:
setCurrentItem
(
sequenceNumber
,
false
)
}
}
...
...
@@ -568,7 +567,7 @@ QGCView {
toggle
:
true
},
{
name
:
"
Pattern
"
,
name
:
_singleComplexItem
?
missionController
.
complexMissionItemNames
[
0
]
:
"
Pattern
"
,
iconSource
:
"
/qmlimages/MapDrawShape.svg
"
,
dropPanelComponent
:
_singleComplexItem
?
undefined
:
patternDropPanel
},
...
...
@@ -721,7 +720,7 @@ QGCView {
readOnly
:
false
rootQgcView
:
_qgcView
onClicked
:
setCurrentItem
(
object
.
sequenceNumber
)
onClicked
:
setCurrentItem
(
object
.
sequenceNumber
,
false
)
onRemove
:
{
var
removeIndex
=
index
...
...
@@ -731,7 +730,7 @@ QGCView {
removeIndex
--
}
_currentMissionIndex
=
-
1
rootQgcView
.
setCurrentItem
(
removeIndex
)
rootQgcView
.
setCurrentItem
(
removeIndex
,
true
)
}
onInsertWaypoint
:
insertSimpleMissionItem
(
editorMap
.
center
,
index
)
...
...
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