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
40e8ff49
Commit
40e8ff49
authored
Apr 02, 2016
by
Don Gagne
Browse files
Fix SimpleMissionItem resetting default values over coordinate
parent
482ef626
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/MissionManager/MissionItem.cc
View file @
40e8ff49
...
...
@@ -203,6 +203,10 @@ bool MissionItem::load(const QJsonObject& json, QString& errorString)
return
false
;
}
// Make sure to set these first since they can signal other changes
setFrame
((
MAV_FRAME
)
json
[
_jsonFrameKey
].
toInt
());
setCommand
((
MAV_CMD
)
json
[
_jsonCommandKey
].
toInt
());
QGeoCoordinate
coordinate
;
if
(
!
JsonHelper
::
toQGeoCoordinate
(
json
[
_jsonCoordinateKey
],
coordinate
,
true
/* altitudeRequired */
,
errorString
))
{
return
false
;
...
...
@@ -213,8 +217,6 @@ bool MissionItem::load(const QJsonObject& json, QString& errorString)
setIsCurrentItem
(
false
);
setSequenceNumber
(
json
[
_jsonIdKey
].
toInt
());
setFrame
((
MAV_FRAME
)
json
[
_jsonFrameKey
].
toInt
());
setCommand
((
MAV_CMD
)
json
[
_jsonCommandKey
].
toInt
());
setParam1
(
json
[
_jsonParam1Key
].
toDouble
());
setParam2
(
json
[
_jsonParam2Key
].
toDouble
());
setParam3
(
json
[
_jsonParam3Key
].
toDouble
());
...
...
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