From 4573c4df17e74e5cff375c25950693a061cbea88 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 25 Oct 2018 15:36:07 -0700 Subject: [PATCH] Fix Plan save message on exit --- src/PlanView/PlanView.qml | 3 +++ src/ui/MainWindowInner.qml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/PlanView/PlanView.qml b/src/PlanView/PlanView.qml index bf1b07c38..442385078 100644 --- a/src/PlanView/PlanView.qml +++ b/src/PlanView/PlanView.qml @@ -37,6 +37,9 @@ QGCView { property bool planControlColapsed: false + ///< This property is used to determine dirty state for prompting on QGC shutdown + readonly property bool dirty: _planMasterController.dirty + readonly property int _decimalPlaces: 8 readonly property real _horizontalMargin: ScreenTools.defaultFontPixelWidth * 0.5 readonly property real _margin: ScreenTools.defaultFontPixelHeight * 0.5 diff --git a/src/ui/MainWindowInner.qml b/src/ui/MainWindowInner.qml index 4a8af1113..2c9e5819c 100644 --- a/src/ui/MainWindowInner.qml +++ b/src/ui/MainWindowInner.qml @@ -164,7 +164,7 @@ Item { onYes: activeConnectionsCloseDialog.check() function check() { - if (planViewLoader.item && planViewLoader.item.syncNeeded) { + if (planViewLoader.item && planViewLoader.item.dirty) { unsavedMissionCloseDialog.open() } else { activeConnectionsCloseDialog.check() -- 2.22.0