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
b2683dd7
Commit
b2683dd7
authored
Jun 21, 2017
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use better z-ordering to handle cases where drag/split overlay each other
This gives drag clicks precedence over splitting.
parent
098a0204
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
QGCMapPolygonVisuals.qml
src/MissionManager/QGCMapPolygonVisuals.qml
+7
-2
No files found.
src/MissionManager/QGCMapPolygonVisuals.qml
View file @
b2683dd7
...
...
@@ -35,6 +35,9 @@ Item {
property
var
_splitHandlesComponent
property
var
_centerDragHandleComponent
property
real
_zorderDragHandle
:
QGroundControl
.
zOrderMapItems
+
2
property
real
_zorderSplitHandle
:
QGroundControl
.
zOrderMapItems
+
1
function
addVisuals
()
{
_polygonComponent
=
polygonComponent
.
createObject
(
mapControl
)
mapControl
.
addMapItem
(
_polygonComponent
)
...
...
@@ -137,7 +140,6 @@ Item {
id
:
mapQuickItem
anchorPoint.x
:
dragHandle
.
width
/
2
anchorPoint.y
:
dragHandle
.
height
/
2
z
:
QGroundControl
.
zOrderMapItems
+
1
property
int
vertexIndex
...
...
@@ -148,6 +150,7 @@ Item {
radius
:
width
/
2
color
:
"
white
"
opacity
:
.
50
z
:
_zorderSplitHandle
QGCLabel
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
...
...
@@ -205,6 +208,7 @@ Item {
MissionItemIndicatorDrag
{
id
:
dragArea
z
:
_zorderDragHandle
property
int
polygonVertex
...
...
@@ -230,7 +234,7 @@ Item {
id
:
mapQuickItem
anchorPoint.x
:
dragHandle
.
width
/
2
anchorPoint.y
:
dragHandle
.
height
/
2
z
:
QGroundControl
.
zOrderMapItems
+
2
z
:
_zorderDragHandle
sourceItem
:
Rectangle
{
id
:
dragHandle
...
...
@@ -277,6 +281,7 @@ Item {
id
:
centerDragAreaComponent
MissionItemIndicatorDrag
{
z
:
_zorderDragHandle
onItemCoordinateChanged
:
mapPolygon
.
center
=
itemCoordinate
onDragStart
:
mapPolygon
.
centerDrag
=
true
onDragStop
:
mapPolygon
.
centerDrag
=
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