From cb74d3100593369a617b1b84f03040c628d071b2 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Tue, 19 Jun 2018 11:48:24 -0400 Subject: [PATCH] Disable Save if there is nothing to save --- src/PlanView/PlanView.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PlanView/PlanView.qml b/src/PlanView/PlanView.qml index fe23ccf20..0487904ae 100644 --- a/src/PlanView/PlanView.qml +++ b/src/PlanView/PlanView.qml @@ -930,7 +930,7 @@ QGCView { QGCButton { text: qsTr("Save") Layout.fillWidth: true - enabled: !masterController.syncInProgress + enabled: !masterController.syncInProgress && masterController.currentPlanFile !== "" onClicked: { dropPanel.hide() if(masterController.currentPlanFile !== "") { @@ -944,7 +944,7 @@ QGCView { QGCButton { text: qsTr("Save As...") Layout.fillWidth: true - enabled: !masterController.syncInProgress + enabled: !masterController.syncInProgress && _visualItems.count > 1 onClicked: { dropPanel.hide() masterController.saveToSelectedFile() @@ -965,7 +965,7 @@ QGCView { QGCButton { text: qsTr("Save KML...") Layout.fillWidth: true - enabled: !masterController.syncInProgress + enabled: !masterController.syncInProgress && _visualItems.count > 1 onClicked: { // First point does not count if (_visualItems.count < 2) { -- 2.22.0