Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
fa8c52da
Commit
fa8c52da
authored
Jun 05, 2020
by
Patrick José Pereira
Browse files
QGCMapPolyline: Remove deprecated intersect function
Signed-off-by:
Patrick José Pereira
<
patrickelectric@gmail.com
>
parent
f35613ca
Changes
1
Show whitespace changes
Inline
Side-by-side
src/MissionManager/QGCMapPolyline.cc
View file @
fa8c52da
...
@@ -329,7 +329,12 @@ QList<QGeoCoordinate> QGCMapPolyline::offsetPolyline(double distance)
...
@@ -329,7 +329,12 @@ QList<QGeoCoordinate> QGCMapPolyline::offsetPolyline(double distance)
// Intersect the offset edges to generate new central vertices
// Intersect the offset edges to generate new central vertices
QPointF
newVertex
;
QPointF
newVertex
;
for
(
int
i
=
1
;
i
<
rgOffsetEdges
.
count
();
i
++
)
{
for
(
int
i
=
1
;
i
<
rgOffsetEdges
.
count
();
i
++
)
{
if
(
rgOffsetEdges
[
i
-
1
].
intersect
(
rgOffsetEdges
[
i
],
&
newVertex
)
==
QLineF
::
NoIntersection
)
{
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
auto
intersect
=
rgOffsetEdges
[
i
-
1
].
intersect
(
rgOffsetEdges
[
i
],
&
newVertex
);
#else
auto
intersect
=
rgOffsetEdges
[
i
-
1
].
intersects
(
rgOffsetEdges
[
i
],
&
newVertex
);
#endif
if
(
intersect
==
QLineF
::
NoIntersection
)
{
// Two lines are colinear
// Two lines are colinear
newVertex
=
rgOffsetEdges
[
i
].
p2
();
newVertex
=
rgOffsetEdges
[
i
].
p2
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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