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
5b4407a0
Commit
5b4407a0
authored
Apr 27, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid variable name colision
parent
4b8317d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
MultiVehicleList.qml
src/FlightDisplay/MultiVehicleList.qml
+1
-1
FlightModeMenu.qml
src/QmlControls/FlightModeMenu.qml
+7
-7
No files found.
src/FlightDisplay/MultiVehicleList.qml
View file @
5b4407a0
...
@@ -123,7 +123,7 @@ Item {
...
@@ -123,7 +123,7 @@ Item {
Layout.alignment
:
Qt
.
AlignHCenter
Layout.alignment
:
Qt
.
AlignHCenter
font.pointSize
:
ScreenTools
.
largeFontPointSize
font.pointSize
:
ScreenTools
.
largeFontPointSize
color
:
_textColor
color
:
_textColor
activeVehicle
:
_vehicle
currentVehicle
:
_vehicle
}
}
QGCLabel
{
QGCLabel
{
...
...
src/QmlControls/FlightModeMenu.qml
View file @
5b4407a0
...
@@ -17,9 +17,9 @@ import QGroundControl.ScreenTools 1.0
...
@@ -17,9 +17,9 @@ import QGroundControl.ScreenTools 1.0
// Label control whichs pop up a flight mode change menu when clicked
// Label control whichs pop up a flight mode change menu when clicked
QGCLabel
{
QGCLabel
{
id
:
flightModeMenuLabel
id
:
flightModeMenuLabel
text
:
activeVehicle
?
active
Vehicle
.
flightMode
:
qsTr
(
"
N/A
"
,
"
No data to display
"
)
text
:
currentVehicle
?
current
Vehicle
.
flightMode
:
qsTr
(
"
N/A
"
,
"
No data to display
"
)
property
var
active
Vehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
current
Vehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
Menu
{
Menu
{
id
:
flightModesMenu
id
:
flightModesMenu
...
@@ -29,14 +29,14 @@ QGCLabel {
...
@@ -29,14 +29,14 @@ QGCLabel {
id
:
flightModeMenuItemComponent
id
:
flightModeMenuItemComponent
MenuItem
{
MenuItem
{
onTriggered
:
active
Vehicle
.
flightMode
=
text
onTriggered
:
current
Vehicle
.
flightMode
=
text
}
}
}
}
property
var
flightModesMenuItems
:
[]
property
var
flightModesMenuItems
:
[]
function
updateFlightModesMenu
()
{
function
updateFlightModesMenu
()
{
if
(
activeVehicle
&&
active
Vehicle
.
flightModeSetAvailable
)
{
if
(
currentVehicle
&&
current
Vehicle
.
flightModeSetAvailable
)
{
var
i
;
var
i
;
// Remove old menu items
// Remove old menu items
for
(
i
=
0
;
i
<
flightModesMenuItems
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
flightModesMenuItems
.
length
;
i
++
)
{
...
@@ -44,8 +44,8 @@ QGCLabel {
...
@@ -44,8 +44,8 @@ QGCLabel {
}
}
flightModesMenuItems
.
length
=
0
flightModesMenuItems
.
length
=
0
// Add new items
// Add new items
for
(
i
=
0
;
i
<
active
Vehicle
.
flightModes
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
current
Vehicle
.
flightModes
.
length
;
i
++
)
{
var
menuItem
=
flightModeMenuItemComponent
.
createObject
(
null
,
{
"
text
"
:
active
Vehicle
.
flightModes
[
i
]
})
var
menuItem
=
flightModeMenuItemComponent
.
createObject
(
null
,
{
"
text
"
:
current
Vehicle
.
flightModes
[
i
]
})
flightModesMenuItems
.
push
(
menuItem
)
flightModesMenuItems
.
push
(
menuItem
)
flightModesMenu
.
insertItem
(
i
,
menuItem
)
flightModesMenu
.
insertItem
(
i
,
menuItem
)
}
}
...
@@ -60,7 +60,7 @@ QGCLabel {
...
@@ -60,7 +60,7 @@ QGCLabel {
}
}
MouseArea
{
MouseArea
{
visible
:
activeVehicle
&&
active
Vehicle
.
flightModeSetAvailable
visible
:
currentVehicle
&&
current
Vehicle
.
flightModeSetAvailable
anchors.fill
:
parent
anchors.fill
:
parent
onClicked
:
flightModesMenu
.
popup
()
onClicked
:
flightModesMenu
.
popup
()
}
}
...
...
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