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
eca72e33
Commit
eca72e33
authored
Sep 04, 2016
by
Don Gagne
Committed by
GitHub
Sep 04, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4022 from DonLakeFlyer/CancelPolygon
Cancel polygon edit in appropriate places
parents
abb17fc6
3c4abee6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
FlightMap.qml
src/FlightMap/FlightMap.qml
+17
-3
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+3
-1
No files found.
src/FlightMap/FlightMap.qml
View file @
eca72e33
...
...
@@ -221,8 +221,7 @@ Map {
var
polygonPath
=
polygonDrawerPolygon
.
path
polygonPath
.
pop
()
// get rid of drag coordinate
polygonDrawer
.
_clearPolygon
()
polygonDrawer
.
drawingPolygon
=
false
_cancelCapturePolygon
()
polygonDrawer
.
_callbackObject
.
polygonCaptureFinished
(
polygonPath
)
return
true
}
...
...
@@ -292,12 +291,27 @@ Map {
}
function
finishAdjustPolygon
()
{
_cancelAdjustPolygon
()
polygonDrawer
.
_callbackObject
.
polygonAdjustFinished
()
}
/// Cancels an in progress draw or adjust
function
cancelPolygonEdit
()
{
_cancelAdjustPolygon
()
_cancelCapturePolygon
()
}
function
_cancelAdjustPolygon
()
{
polygonDrawer
.
adjustingPolygon
=
false
for
(
var
i
=
0
;
i
<
polygonDrawer
.
_vertexDragList
.
length
;
i
++
)
{
polygonDrawer
.
_vertexDragList
[
i
].
destroy
()
}
polygonDrawer
.
_vertexDragList
=
[]
polygonDrawer
.
_callbackObject
.
polygonAdjustFinished
()
}
function
_cancelCapturePolygon
()
{
polygonDrawer
.
_clearPolygon
()
polygonDrawer
.
drawingPolygon
=
false
}
function
_clearPolygon
()
{
...
...
src/MissionEditor/MissionEditor.qml
View file @
eca72e33
...
...
@@ -145,7 +145,7 @@ QGCView {
onNewItemsFromVehicle
:
{
fitViewportToMissionItems
()
_currentMissionItem
=
_visualItems
.
get
(
0
)
setCurrentItem
(
0
)
}
}
...
...
@@ -172,6 +172,7 @@ QGCView {
}
function
setCurrentItem
(
sequenceNumber
)
{
editorMap
.
polygonDraw
.
cancelPolygonEdit
()
_currentMissionItem
=
undefined
for
(
var
i
=
0
;
i
<
_visualItems
.
count
;
i
++
)
{
var
visualItem
=
_visualItems
.
get
(
i
)
...
...
@@ -554,6 +555,7 @@ QGCView {
onRemove
:
{
itemDragger
.
clearItem
()
missionController
.
removeMissionItem
(
index
)
editorMap
.
polygonDraw
.
cancelPolygonEdit
()
}
onInsert
:
{
...
...
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