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
5977565f
Commit
5977565f
authored
May 03, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bad redraw with Simple Mission Item editors
parent
8192004c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
128 additions
and
150 deletions
+128
-150
MissionItemEditor.qml
src/PlanView/MissionItemEditor.qml
+2
-6
SimpleItemEditor.qml
src/PlanView/SimpleItemEditor.qml
+126
-144
No files found.
src/PlanView/MissionItemEditor.qml
View file @
5977565f
...
@@ -15,7 +15,7 @@ import QGroundControl.Palette 1.0
...
@@ -15,7 +15,7 @@ import QGroundControl.Palette 1.0
/// Mission item edit control
/// Mission item edit control
Rectangle
{
Rectangle
{
id
:
_root
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
color
:
_currentItem
?
qgcPal
.
missionItemEditor
:
qgcPal
.
windowShade
radius
:
_radius
radius
:
_radius
...
@@ -198,12 +198,8 @@ Rectangle {
...
@@ -198,12 +198,8 @@ Rectangle {
anchors.topMargin
:
_margin
anchors.topMargin
:
_margin
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.top
:
commandPicker
.
bottom
anchors.top
:
commandPicker
.
bottom
height
:
item
?
item
.
height
:
0
source
:
missionItem
.
editorQml
source
:
missionItem
.
editorQml
visible
:
_currentItem
onLoaded
:
{
item
.
visible
=
Qt
.
binding
(
function
()
{
return
_currentItem
;
})
}
property
var
masterController
:
_masterController
property
var
masterController
:
_masterController
property
real
availableWidth
:
_root
.
width
-
(
_margin
*
2
)
///< How wide the editor should be
property
real
availableWidth
:
_root
.
width
-
(
_margin
*
2
)
///< How wide the editor should be
...
...
src/PlanView/SimpleItemEditor.qml
View file @
5977565f
...
@@ -12,148 +12,130 @@ import QGroundControl.Palette 1.0
...
@@ -12,148 +12,130 @@ import QGroundControl.Palette 1.0
// Editor for Simple mission items
// Editor for Simple mission items
Rectangle
{
Rectangle
{
id
:
valuesRect
width
:
availableWidth
width
:
availableWidth
height
:
valuesColumn
.
height
+
_margin
height
:
deferedload
.
status
==
Loader
.
Ready
?
(
visible
?
deferedload
.
item
.
height
:
0
)
:
0
color
:
qgcPal
.
windowShadeDark
color
:
qgcPal
.
windowShadeDark
radius
:
_radius
visible
:
missionItem
.
isCurrentItem
radius
:
_radius
Column
{
id
:
valuesColumn
Loader
{
anchors.margins
:
_margin
id
:
deferedload
anchors.left
:
parent
.
left
active
:
valuesRect
.
visible
anchors.right
:
parent
.
right
asynchronous
:
true
anchors.top
:
parent
.
top
anchors.margins
:
_margin
spacing
:
_margin
anchors.left
:
valuesRect
.
left
anchors.right
:
valuesRect
.
right
QGCLabel
{
anchors.top
:
valuesRect
.
top
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
sourceComponent
:
Component
{
font.pointSize
:
ScreenTools
.
smallFontPointSize
Item
{
text
:
missionItem
.
rawEdit
?
id
:
valuesItem
qsTr
(
"
Provides advanced access to all commands/parameters. Be very careful!
"
)
:
height
:
valuesColumn
.
height
+
(
_margin
*
2
)
missionItem
.
commandDescription
}
Column
{
id
:
valuesColumn
GridLayout
{
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
columns
:
2
spacing
:
_margin
Repeater
{
QGCLabel
{
model
:
missionItem
.
comboboxFacts
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
QGCLabel
{
font.pointSize
:
ScreenTools
.
smallFontPointSize
text
:
object
.
name
text
:
missionItem
.
rawEdit
?
visible
:
object
.
name
!=
""
qsTr
(
"
Provides advanced access to all commands/parameters. Be very careful!
"
)
:
Layout.column
:
0
missionItem
.
commandDescription
Layout.row
:
index
}
}
}
GridLayout
{
anchors.left
:
parent
.
left
Repeater
{
anchors.right
:
parent
.
right
model
:
missionItem
.
comboboxFacts
columns
:
2
FactComboBox
{
Repeater
{
indexModel
:
false
model
:
missionItem
.
comboboxFacts
model
:
object
.
enumStrings
fact
:
object
QGCLabel
{
Layout.column
:
1
text
:
object
.
name
Layout.row
:
index
visible
:
object
.
name
!=
""
Layout.fillWidth
:
true
Layout.column
:
0
}
Layout.row
:
index
}
}
}
}
GridLayout
{
Repeater
{
anchors.left
:
parent
.
left
model
:
missionItem
.
comboboxFacts
anchors.right
:
parent
.
right
flow
:
GridLayout
.
TopToBottom
FactComboBox
{
rows
:
missionItem
.
textFieldFacts
.
count
+
missionItem
.
nanFacts
.
count
+
(
missionItem
.
speedSection
.
available
?
1
:
0
)
indexModel
:
false
columns
:
2
model
:
object
.
enumStrings
fact
:
object
Repeater
{
Layout.column
:
1
model
:
missionItem
.
textFieldFacts
Layout.row
:
index
Layout.fillWidth
:
true
QGCLabel
{
text
:
object
.
name
}
}
}
}
}
Repeater
{
model
:
missionItem
.
nanFacts
GridLayout
{
anchors.left
:
parent
.
left
QGCCheckBox
{
anchors.right
:
parent
.
right
text
:
object
.
name
flow
:
GridLayout
.
TopToBottom
checked
:
!
isNaN
(
object
.
rawValue
)
rows
:
missionItem
.
textFieldFacts
.
count
+
missionItem
.
nanFacts
.
count
+
(
missionItem
.
speedSection
.
available
?
1
:
0
)
onClicked
:
object
.
rawValue
=
checked
?
0
:
NaN
columns
:
2
}
}
Repeater
{
model
:
missionItem
.
textFieldFacts
QGCCheckBox
{
id
:
flightSpeedCheckbox
QGCLabel
{
text
:
object
.
name
}
text
:
qsTr
(
"
Flight Speed
"
)
}
checked
:
missionItem
.
speedSection
.
specifyFlightSpeed
onClicked
:
missionItem
.
speedSection
.
specifyFlightSpeed
=
checked
Repeater
{
visible
:
missionItem
.
speedSection
.
available
model
:
missionItem
.
nanFacts
}
QGCCheckBox
{
Repeater
{
text
:
object
.
name
model
:
missionItem
.
textFieldFacts
checked
:
!
isNaN
(
object
.
rawValue
)
onClicked
:
object
.
rawValue
=
checked
?
0
:
NaN
FactTextField
{
}
showUnits
:
true
}
fact
:
object
Layout.fillWidth
:
true
QGCCheckBox
{
}
id
:
flightSpeedCheckbox
}
text
:
qsTr
(
"
Flight Speed
"
)
checked
:
missionItem
.
speedSection
.
specifyFlightSpeed
Repeater
{
onClicked
:
missionItem
.
speedSection
.
specifyFlightSpeed
=
checked
model
:
missionItem
.
nanFacts
visible
:
missionItem
.
speedSection
.
available
}
FactTextField
{
showUnits
:
true
Repeater
{
fact
:
object
model
:
missionItem
.
textFieldFacts
Layout.fillWidth
:
true
enabled
:
!
isNaN
(
object
.
rawValue
)
FactTextField
{
}
showUnits
:
true
}
fact
:
object
Layout.fillWidth
:
true
FactTextField
{
}
fact
:
missionItem
.
speedSection
.
flightSpeed
}
Layout.fillWidth
:
true
enabled
:
flightSpeedCheckbox
.
checked
Repeater
{
visible
:
missionItem
.
speedSection
.
available
model
:
missionItem
.
nanFacts
}
}
FactTextField
{
showUnits
:
true
Repeater
{
fact
:
object
model
:
missionItem
.
checkboxFacts
Layout.fillWidth
:
true
enabled
:
!
isNaN
(
object
.
rawValue
)
FactCheckBox
{
}
text
:
object
.
name
}
fact
:
object
}
FactTextField
{
}
fact
:
missionItem
.
speedSection
.
flightSpeed
Layout.fillWidth
:
true
CameraSection
{
enabled
:
flightSpeedCheckbox
.
checked
checked
:
missionItem
.
cameraSection
.
settingsSpecified
visible
:
missionItem
.
speedSection
.
available
visible
:
missionItem
.
cameraSection
.
available
}
}
}
}
// Column
Repeater
{
model
:
missionItem
.
checkboxFacts
FactCheckBox
{
text
:
object
.
name
fact
:
object
}
}
CameraSection
{
checked
:
missionItem
.
cameraSection
.
settingsSpecified
visible
:
missionItem
.
cameraSection
.
available
}
}
// Column
}
// Item
}
// Component
}
// Loader
}
// Rectangle
}
// Rectangle
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