Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
43f2fb1d
Commit
43f2fb1d
authored
May 03, 2017
by
Don Gagne
Committed by
GitHub
May 03, 2017
Browse files
Merge pull request #5088 from DonLakeFlyer/MissionEditorRedraw
Fix bad redraw with Simple Mission Item editors
parents
a1e086e5
5977565f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/PlanView/MissionItemEditor.qml
View file @
43f2fb1d
...
...
@@ -15,7 +15,7 @@ import QGroundControl.Palette 1.0
/// Mission item edit control
Rectangle
{
id
:
_root
height
:
editorLoader
.
y
+
editorLoader
.
height
+
(
_margin
*
2
)
height
:
editorLoader
.
y
+
(
editorLoader
.
visible
?
editorLoader
.
height
:
0
)
+
(
_margin
*
2
)
color
:
_currentItem
?
qgcPal
.
missionItemEditor
:
qgcPal
.
windowShade
radius
:
_radius
...
...
@@ -198,12 +198,8 @@ Rectangle {
anchors.topMargin
:
_margin
anchors.left
:
parent
.
left
anchors.top
:
commandPicker
.
bottom
height
:
item
?
item
.
height
:
0
source
:
missionItem
.
editorQml
onLoaded
:
{
item
.
visible
=
Qt
.
binding
(
function
()
{
return
_currentItem
;
})
}
visible
:
_currentItem
property
var
masterController
:
_masterController
property
real
availableWidth
:
_root
.
width
-
(
_margin
*
2
)
///< How wide the editor should be
...
...
src/PlanView/SimpleItemEditor.qml
View file @
43f2fb1d
...
...
@@ -12,148 +12,130 @@ import QGroundControl.Palette 1.0
// Editor for Simple mission items
Rectangle
{
id
:
valuesRect
width
:
availableWidth
height
:
deferedload
.
status
==
Loader
.
Ready
?
(
visible
?
deferedload
.
item
.
height
:
0
)
:
0
color
:
qgcPal
.
windowShadeDark
visible
:
missionItem
.
isCurrentItem
radius
:
_radius
Loader
{
id
:
deferedload
active
:
valuesRect
.
visible
asynchronous
:
true
anchors.margins
:
_margin
anchors.left
:
valuesRect
.
left
anchors.right
:
valuesRect
.
right
anchors.top
:
valuesRect
.
top
sourceComponent
:
Component
{
Item
{
id
:
valuesItem
height
:
valuesColumn
.
height
+
(
_margin
*
2
)
Column
{
id
:
valuesColumn
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
spacing
:
_margin
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
missionItem
.
rawEdit
?
qsTr
(
"
Provides advanced access to all commands/parameters. Be very careful!
"
)
:
missionItem
.
commandDescription
}
GridLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
columns
:
2
Repeater
{
model
:
missionItem
.
comboboxFacts
QGCLabel
{
text
:
object
.
name
visible
:
object
.
name
!=
""
Layout.column
:
0
Layout.row
:
index
}
}
Repeater
{
model
:
missionItem
.
comboboxFacts
FactComboBox
{
indexModel
:
false
model
:
object
.
enumStrings
fact
:
object
Layout.column
:
1
Layout.row
:
index
Layout.fillWidth
:
true
}
}
}
GridLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
flow
:
GridLayout
.
TopToBottom
rows
:
missionItem
.
textFieldFacts
.
count
+
missionItem
.
nanFacts
.
count
+
(
missionItem
.
speedSection
.
available
?
1
:
0
)
columns
:
2
Repeater
{
model
:
missionItem
.
textFieldFacts
QGCLabel
{
text
:
object
.
name
}
}
Repeater
{
model
:
missionItem
.
nanFacts
QGCCheckBox
{
text
:
object
.
name
checked
:
!
isNaN
(
object
.
rawValue
)
onClicked
:
object
.
rawValue
=
checked
?
0
:
NaN
}
}
QGCCheckBox
{
id
:
flightSpeedCheckbox
text
:
qsTr
(
"
Flight Speed
"
)
checked
:
missionItem
.
speedSection
.
specifyFlightSpeed
onClicked
:
missionItem
.
speedSection
.
specifyFlightSpeed
=
checked
visible
:
missionItem
.
speedSection
.
available
}
Repeater
{
model
:
missionItem
.
textFieldFacts
FactTextField
{
showUnits
:
true
fact
:
object
Layout.fillWidth
:
true
}
}
Repeater
{
model
:
missionItem
.
nanFacts
FactTextField
{
showUnits
:
true
fact
:
object
Layout.fillWidth
:
true
enabled
:
!
isNaN
(
object
.
rawValue
)
}
}
FactTextField
{
fact
:
missionItem
.
speedSection
.
flightSpeed
Layout.fillWidth
:
true
enabled
:
flightSpeedCheckbox
.
checked
visible
:
missionItem
.
speedSection
.
available
}
}
Repeater
{
model
:
missionItem
.
checkboxFacts
FactCheckBox
{
text
:
object
.
name
fact
:
object
}
}
CameraSection
{
checked
:
missionItem
.
cameraSection
.
settingsSpecified
visible
:
missionItem
.
cameraSection
.
available
}
}
// Column
}
// Item
}
// Component
}
// Loader
width
:
availableWidth
height
:
valuesColumn
.
height
+
_margin
color
:
qgcPal
.
windowShadeDark
radius
:
_radius
Column
{
id
:
valuesColumn
anchors.margins
:
_margin
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
spacing
:
_margin
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
missionItem
.
rawEdit
?
qsTr
(
"
Provides advanced access to all commands/parameters. Be very careful!
"
)
:
missionItem
.
commandDescription
}
GridLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
columns
:
2
Repeater
{
model
:
missionItem
.
comboboxFacts
QGCLabel
{
text
:
object
.
name
visible
:
object
.
name
!=
""
Layout.column
:
0
Layout.row
:
index
}
}
Repeater
{
model
:
missionItem
.
comboboxFacts
FactComboBox
{
indexModel
:
false
model
:
object
.
enumStrings
fact
:
object
Layout.column
:
1
Layout.row
:
index
Layout.fillWidth
:
true
}
}
}
GridLayout
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
flow
:
GridLayout
.
TopToBottom
rows
:
missionItem
.
textFieldFacts
.
count
+
missionItem
.
nanFacts
.
count
+
(
missionItem
.
speedSection
.
available
?
1
:
0
)
columns
:
2
Repeater
{
model
:
missionItem
.
textFieldFacts
QGCLabel
{
text
:
object
.
name
}
}
Repeater
{
model
:
missionItem
.
nanFacts
QGCCheckBox
{
text
:
object
.
name
checked
:
!
isNaN
(
object
.
rawValue
)
onClicked
:
object
.
rawValue
=
checked
?
0
:
NaN
}
}
QGCCheckBox
{
id
:
flightSpeedCheckbox
text
:
qsTr
(
"
Flight Speed
"
)
checked
:
missionItem
.
speedSection
.
specifyFlightSpeed
onClicked
:
missionItem
.
speedSection
.
specifyFlightSpeed
=
checked
visible
:
missionItem
.
speedSection
.
available
}
Repeater
{
model
:
missionItem
.
textFieldFacts
FactTextField
{
showUnits
:
true
fact
:
object
Layout.fillWidth
:
true
}
}
Repeater
{
model
:
missionItem
.
nanFacts
FactTextField
{
showUnits
:
true
fact
:
object
Layout.fillWidth
:
true
enabled
:
!
isNaN
(
object
.
rawValue
)
}
}
FactTextField
{
fact
:
missionItem
.
speedSection
.
flightSpeed
Layout.fillWidth
:
true
enabled
:
flightSpeedCheckbox
.
checked
visible
:
missionItem
.
speedSection
.
available
}
}
Repeater
{
model
:
missionItem
.
checkboxFacts
FactCheckBox
{
text
:
object
.
name
fact
:
object
}
}
CameraSection
{
checked
:
missionItem
.
cameraSection
.
settingsSpecified
visible
:
missionItem
.
cameraSection
.
available
}
}
// Column
}
// Rectangle
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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