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
18cf8ba9
Commit
18cf8ba9
authored
Apr 22, 2016
by
dogmaphobic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing the Mission Editor view to respect the view area (so the map extends beneath the toolbar)
parent
28373366
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
27 deletions
+39
-27
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+34
-19
MainWindowInner.qml
src/ui/MainWindowInner.qml
+5
-8
No files found.
src/MissionEditor/MissionEditor.qml
View file @
18cf8ba9
...
...
@@ -90,7 +90,7 @@ QGCView {
function
loadFromFile
()
{
if
(
ScreenTools
.
isMobile
)
{
_root
.
showDialog
(
mobileFilePicker
,
qsTr
(
"
Select Mission File
"
),
_root
.
showDialogDefaultWidth
,
StandardButton
.
Yes
|
StandardButton
.
Cancel
)
_root
.
showDialog
(
mobileFilePicker
,
qsTr
(
"
Select Mission File
"
),
_root
.
showDialogDefaultWidth
,
StandardButton
.
Yes
|
StandardButton
.
Cancel
,
true
)
}
else
{
controller
.
loadMissionFromFilePicker
()
fitViewportToMissionItems
()
...
...
@@ -99,7 +99,7 @@ QGCView {
function
saveToFile
()
{
if
(
ScreenTools
.
isMobile
)
{
_root
.
showDialog
(
mobileFileSaver
,
qsTr
(
"
Save Mission File
"
),
_root
.
showDialogDefaultWidth
,
StandardButton
.
Save
|
StandardButton
.
Cancel
)
_root
.
showDialog
(
mobileFileSaver
,
qsTr
(
"
Save Mission File
"
),
_root
.
showDialogDefaultWidth
,
StandardButton
.
Save
|
StandardButton
.
Cancel
,
true
)
}
else
{
controller
.
saveMissionToFilePicker
()
}
...
...
@@ -252,14 +252,20 @@ QGCView {
QGCViewPanel
{
id
:
panel
anchors.fill
:
parent
height
:
ScreenTools
.
availableHeight
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
Item
{
anchors.fill
:
parent
FlightMap
{
id
:
editorMap
anchors.fill
:
parent
height
:
_root
.
height
anchors.bottom
:
parent
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
mapName
:
"
MissionEditor
"
signal
mapClicked
(
var
coordinate
)
...
...
@@ -277,9 +283,13 @@ QGCView {
}
MouseArea
{
//-- It's a whole lot faster to just fill parent and deal with top offset below
// than computing the coordinate offset.
anchors.fill
:
parent
onClicked
:
{
//-- Don't pay attention to items beneath the toolbar.
var
topLimit
=
parent
.
height
-
ScreenTools
.
availableHeight
if
(
mouse
.
y
>=
topLimit
)
{
var
coordinate
=
editorMap
.
toCoordinate
(
Qt
.
point
(
mouse
.
x
,
mouse
.
y
))
coordinate
.
latitude
=
coordinate
.
latitude
.
toFixed
(
_decimalPlaces
)
coordinate
.
longitude
=
coordinate
.
longitude
.
toFixed
(
_decimalPlaces
)
...
...
@@ -293,6 +303,7 @@ QGCView {
}
}
}
}
// We use this item to support dragging since dragging a MapQuickItem just doesn't seem to work
Rectangle
{
...
...
@@ -399,6 +410,9 @@ QGCView {
missionItem
:
object
sequenceNumber
:
object
.
sequenceNumber
//-- If you don't want to allow selecting items beneath the
// toolbar, the code below has to check and see if mouse.y
// is greater than (map.height - ScreenTools.availableHeight)
onClicked
:
setCurrentItem
(
object
.
sequenceNumber
)
function
updateItemIndicator
()
{
...
...
@@ -458,7 +472,7 @@ QGCView {
// Mission Item Editor
Item
{
id
:
missionItemEditor
anchors.top
:
parent
.
top
height
:
ScreenTools
.
availableHeight
anchors.bottom
:
parent
.
bottom
anchors.right
:
parent
.
right
width
:
_rightPanelWidth
...
...
@@ -530,6 +544,7 @@ QGCView {
//-- Vertical Tool Buttons
Column
{
id
:
toolColumn
anchors.topMargin
:
parent
.
height
-
ScreenTools
.
availableHeight
+
ScreenTools
.
defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
...
...
@@ -786,7 +801,7 @@ QGCView {
onClicked
:
{
syncButton
.
hideDropDown
()
if
(
syncNeeded
)
{
_root
.
showDialog
(
syncLoadFromVehicleOverwrite
,
qsTr
(
"
Mission overwrite
"
),
_root
.
showDialogDefaultWidth
,
StandardButton
.
Yes
|
StandardButton
.
Cancel
)
_root
.
showDialog
(
syncLoadFromVehicleOverwrite
,
qsTr
(
"
Mission overwrite
"
),
_root
.
showDialogDefaultWidth
,
StandardButton
.
Yes
|
StandardButton
.
Cancel
,
true
)
}
else
{
loadFromVehicle
()
}
...
...
@@ -814,7 +829,7 @@ QGCView {
onClicked
:
{
syncButton
.
hideDropDown
()
if
(
syncNeeded
)
{
_root
.
showDialog
(
syncLoadFromFileOverwrite
,
qsTr
(
"
Mission overwrite
"
),
_root
.
showDialogDefaultWidth
,
StandardButton
.
Yes
|
StandardButton
.
Cancel
)
_root
.
showDialog
(
syncLoadFromFileOverwrite
,
qsTr
(
"
Mission overwrite
"
),
_root
.
showDialogDefaultWidth
,
StandardButton
.
Yes
|
StandardButton
.
Cancel
,
true
)
}
else
{
loadFromFile
()
}
...
...
@@ -826,7 +841,7 @@ QGCView {
text
:
qsTr
(
"
Remove all
"
)
onClicked
:
{
syncButton
.
hideDropDown
()
_root
.
showDialog
(
removeAllPromptDialog
,
qsTr
(
"
Delete all
"
),
_root
.
showDialogDefaultWidth
,
StandardButton
.
Yes
|
StandardButton
.
No
)
_root
.
showDialog
(
removeAllPromptDialog
,
qsTr
(
"
Delete all
"
),
_root
.
showDialogDefaultWidth
,
StandardButton
.
Yes
|
StandardButton
.
No
,
true
)
}
}
...
...
src/ui/MainWindowInner.qml
View file @
18cf8ba9
...
...
@@ -296,10 +296,7 @@ Item {
Loader
{
id
:
planViewLoader
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
toolBar
.
bottom
anchors.bottom
:
parent
.
bottom
anchors.fill
:
parent
visible
:
false
}
...
...
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