|
|
|
@ -28,8 +28,6 @@ import QGroundControl.Controllers 1.0
@@ -28,8 +28,6 @@ import QGroundControl.Controllers 1.0
|
|
|
|
|
QGCView { |
|
|
|
|
id: _root |
|
|
|
|
|
|
|
|
|
property bool syncNeeded: controller.visualItems.dirty // Unsaved changes, visible to parent container |
|
|
|
|
|
|
|
|
|
viewPanel: panel |
|
|
|
|
|
|
|
|
|
// zOrder comes from the Loader in MainWindow.qml |
|
|
|
@ -46,6 +44,7 @@ QGCView {
@@ -46,6 +44,7 @@ QGCView {
|
|
|
|
|
readonly property int _addMissionItemsButtonAutoOffTimeout: 10000 |
|
|
|
|
readonly property var _defaultVehicleCoordinate: QtPositioning.coordinate(37.803784, -122.462276) |
|
|
|
|
|
|
|
|
|
property bool _syncNeeded: controller.visualItems.dirty // Unsaved changes, visible to parent container |
|
|
|
|
property var _visualItems: controller.visualItems |
|
|
|
|
property var _currentMissionItem |
|
|
|
|
property int _currentMissionIndex: 0 |
|
|
|
@ -561,7 +560,7 @@ QGCView {
@@ -561,7 +560,7 @@ QGCView {
|
|
|
|
|
DropButton { |
|
|
|
|
id: syncButton |
|
|
|
|
dropDirection: dropRight |
|
|
|
|
buttonImage: syncNeeded ? "/qmlimages/MapSyncChanged.svg" : "/qmlimages/MapSync.svg" |
|
|
|
|
buttonImage: _syncNeeded ? "/qmlimages/MapSyncChanged.svg" : "/qmlimages/MapSync.svg" |
|
|
|
|
viewportMargins: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
exclusiveGroup: _dropButtonsExclusiveGroup |
|
|
|
|
dropDownComponent: syncDropDownComponent |
|
|
|
@ -745,7 +744,7 @@ QGCView {
@@ -745,7 +744,7 @@ QGCView {
|
|
|
|
|
QGCLabel { |
|
|
|
|
width: sendSaveGrid.width |
|
|
|
|
wrapMode: Text.WordWrap |
|
|
|
|
text: syncNeeded && !controller.autoSync ? |
|
|
|
|
text: _syncNeeded && !controller.autoSync ? |
|
|
|
|
qsTr("You have unsaved changed to you mission. You should send to your vehicle, or save to a file:") : |
|
|
|
|
qsTr("Sync:") |
|
|
|
|
} |
|
|
|
@ -771,7 +770,7 @@ QGCView {
@@ -771,7 +770,7 @@ QGCView {
|
|
|
|
|
enabled: _activeVehicle && !controller.syncInProgress |
|
|
|
|
onClicked: { |
|
|
|
|
syncButton.hideDropDown() |
|
|
|
|
if (syncNeeded) { |
|
|
|
|
if (_syncNeeded) { |
|
|
|
|
_root.showDialog(syncLoadFromVehicleOverwrite, qsTr("Mission overwrite"), _root.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) |
|
|
|
|
} else { |
|
|
|
|
loadFromVehicle() |
|
|
|
@ -793,7 +792,7 @@ QGCView {
@@ -793,7 +792,7 @@ QGCView {
|
|
|
|
|
enabled: !controller.syncInProgress |
|
|
|
|
onClicked: { |
|
|
|
|
syncButton.hideDropDown() |
|
|
|
|
if (syncNeeded) { |
|
|
|
|
if (_syncNeeded) { |
|
|
|
|
_root.showDialog(syncLoadFromFileOverwrite, qsTr("Mission overwrite"), _root.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel) |
|
|
|
|
} else { |
|
|
|
|
loadFromFile() |
|
|
|
|