Browse Source

Merge pull request #5818 from patrickelectric/2

PlanView: Solve KML error
QGC4.4
Don Gagne 8 years ago committed by GitHub
parent
commit
e66e74faf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      src/PlanView/PlanView.qml

13
src/PlanView/PlanView.qml

@ -142,6 +142,14 @@ QGCView {
} }
} }
Component {
id: noItemForKML
QGCViewMessage {
message: qsTr("You need at least one item to create a KML.")
}
}
PlanMasterController { PlanMasterController {
id: masterController id: masterController
@ -786,6 +794,11 @@ QGCView {
Layout.fillWidth: true Layout.fillWidth: true
enabled: !masterController.syncInProgress enabled: !masterController.syncInProgress
onClicked: { onClicked: {
// First point do not count
if (_visualItems.count < 2) {
_qgcView.showDialog(noItemForKML, qsTr("KML"), _qgcView.showDialogDefaultWidth, StandardButton.Cancel)
return
}
dropPanel.hide() dropPanel.hide()
masterController.saveKmlToSelectedFile() masterController.saveKmlToSelectedFile()
} }

Loading…
Cancel
Save