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
c43a4967
Commit
c43a4967
authored
Jun 09, 2020
by
Aleksey Kontsevich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress selected vertex out of bounds warning in unit tests
parent
aca27c21
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
QGCMapPolygon.cc
src/MissionManager/QGCMapPolygon.cc
+6
-1
QGCMapPolyline.cc
src/MissionManager/QGCMapPolyline.cc
+5
-1
No files found.
src/MissionManager/QGCMapPolygon.cc
View file @
c43a4967
...
...
@@ -13,6 +13,7 @@
#include "QGCQGeoCoordinate.h"
#include "QGCApplication.h"
#include "ShapeFileHelper.h"
#include "QGCLoggingCategory.h"
#include <QGeoRectangle>
#include <QDebug>
...
...
@@ -635,7 +636,11 @@ void QGCMapPolygon::selectVertex(int index)
if
(
-
1
<=
index
&&
index
<
count
())
{
_selectedVertexIndex
=
index
;
}
else
{
qWarning
()
<<
"QGCMapPolygon: Selected vertex index is out of bounds!"
;
if
(
!
qgcApp
()
->
runningUnitTests
())
{
qCWarning
(
ParameterManagerLog
)
<<
QString
(
"QGCMapPolygon: Selected vertex index (%1) is out of bounds! "
"Polygon vertices indexes range is [%2..%3]."
).
arg
(
index
).
arg
(
0
).
arg
(
count
()
-
1
);
}
_selectedVertexIndex
=
-
1
;
// deselect vertex
}
...
...
src/MissionManager/QGCMapPolyline.cc
View file @
c43a4967
...
...
@@ -452,7 +452,11 @@ void QGCMapPolyline::selectVertex(int index)
if
(
-
1
<=
index
&&
index
<
count
())
{
_selectedVertexIndex
=
index
;
}
else
{
qWarning
()
<<
"QGCMapPolyline: Selected vertex index is out of bounds!"
;
if
(
!
qgcApp
()
->
runningUnitTests
())
{
qCWarning
(
ParameterManagerLog
)
<<
QString
(
"QGCMapPolyline: Selected vertex index (%1) is out of bounds! "
"Polyline vertices indexes range is [%2..%3]."
).
arg
(
index
).
arg
(
0
).
arg
(
count
()
-
1
);
}
_selectedVertexIndex
=
-
1
;
// deselect vertex
}
...
...
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