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
6d21e26c
Commit
6d21e26c
authored
Oct 17, 2020
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
area centering added to flight view, centering if wima controller visual items change.
parent
f6b6211e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+31
-0
WimaView.qml
src/WimaView/WimaView.qml
+0
-1
No files found.
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
6d21e26c
...
...
@@ -184,6 +184,19 @@ FlightMap {
}
}
Connections
{
target
:
_wimaController
onVisualItemsChanged
:
{
var
visualItems
=
_wimaController
.
visualItems
if
(
visualItems
&&
visualItems
.
count
>
0
)
{
if
(
recenterNeeded
()){
mapFitFunctions
.
fitMapViewportToAreas
()
}
}
}
}
ExclusiveGroup
{
id
:
_mapTypeButtonsExclusiveGroup
}
...
...
@@ -195,6 +208,24 @@ FlightMap {
planMasterController
:
_planMasterController
property
real
leftToolWidth
:
toolStrip
.
x
+
toolStrip
.
width
function
fitMapViewportToAreas
()
{
if
(
!
_wimaController
.
visualItems
)
{
// Being called prior to controller.start
return
}
var
coordList
=
[
]
for
(
var
i
=
0
;
i
<
_wimaController
.
visualItems
.
count
;
i
++
){
var
area
=
_wimaController
.
visualItems
.
get
(
i
)
for
(
var
j
=
0
;
j
<
area
.
path
.
length
;
++
j
){
var
vertex
=
area
.
path
[
j
]
coordList
.
push
(
vertex
)
}
}
console
.
log
(
coordList
)
fitMapViewportToAllCoordinates
(
coordList
)
}
}
// Add wima Areas to the Map
...
...
src/WimaView/WimaView.qml
View file @
6d21e26c
...
...
@@ -132,7 +132,6 @@ QGCView {
coordList
.
push
(
vertex
)
}
}
console
.
log
(
coordList
)
fitMapViewportToAllCoordinates
(
coordList
)
}
}
...
...
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