Commit cb74d310 authored by Gus Grubba's avatar Gus Grubba

Disable Save if there is nothing to save

parent 611b3330
...@@ -930,7 +930,7 @@ QGCView { ...@@ -930,7 +930,7 @@ QGCView {
QGCButton { QGCButton {
text: qsTr("Save") text: qsTr("Save")
Layout.fillWidth: true Layout.fillWidth: true
enabled: !masterController.syncInProgress enabled: !masterController.syncInProgress && masterController.currentPlanFile !== ""
onClicked: { onClicked: {
dropPanel.hide() dropPanel.hide()
if(masterController.currentPlanFile !== "") { if(masterController.currentPlanFile !== "") {
...@@ -944,7 +944,7 @@ QGCView { ...@@ -944,7 +944,7 @@ QGCView {
QGCButton { QGCButton {
text: qsTr("Save As...") text: qsTr("Save As...")
Layout.fillWidth: true Layout.fillWidth: true
enabled: !masterController.syncInProgress enabled: !masterController.syncInProgress && _visualItems.count > 1
onClicked: { onClicked: {
dropPanel.hide() dropPanel.hide()
masterController.saveToSelectedFile() masterController.saveToSelectedFile()
...@@ -965,7 +965,7 @@ QGCView { ...@@ -965,7 +965,7 @@ QGCView {
QGCButton { QGCButton {
text: qsTr("Save KML...") text: qsTr("Save KML...")
Layout.fillWidth: true Layout.fillWidth: true
enabled: !masterController.syncInProgress enabled: !masterController.syncInProgress && _visualItems.count > 1
onClicked: { onClicked: {
// First point does not count // First point does not count
if (_visualItems.count < 2) { if (_visualItems.count < 2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment