From 92506689cc5a05467e121356cb70bd067bfd6518 Mon Sep 17 00:00:00 2001
From: Valentin Platzgummer <valentin.platzgummer@ymail.com>
Date: Thu, 15 Oct 2020 12:28:59 +0200
Subject: [PATCH] propgress issue solved

---
 src/Wima/Snake/NemoInterface.cpp | 1 +
 src/Wima/WimaController.cc       | 4 ++--
 src/Wima/WimaPlaner.cc           | 4 ++--
 src/WimaView/WimaToolBar.qml     | 4 +---
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/Wima/Snake/NemoInterface.cpp b/src/Wima/Snake/NemoInterface.cpp
index 671a3ccdcc..9b0927aeeb 100644
--- a/src/Wima/Snake/NemoInterface.cpp
+++ b/src/Wima/Snake/NemoInterface.cpp
@@ -248,6 +248,7 @@ bool NemoInterface::Impl::doTopicServiceSetup() {
           progressMsg.progress().clear();
           qgcApp()->showMessage("Invalid progress message received.");
         }
+        emit this->parent->progressChanged();
 
         lk1.unlock();
         lk2.unlock();
diff --git a/src/Wima/WimaController.cc b/src/Wima/WimaController.cc
index a35e2462bc..7a9aa89ffc 100644
--- a/src/Wima/WimaController.cc
+++ b/src/Wima/WimaController.cc
@@ -90,11 +90,11 @@ MissionController *WimaController::missionController() {
 QmlObjectListModel *WimaController::visualItems() { return &_areas; }
 
 QmlObjectListModel *WimaController::missionItems() {
-  return const_cast<QmlObjectListModel *>(&_currentWM->missionItems());
+  return const_cast<QmlObjectListModel *>(&_currentWM->currentMissionItems());
 }
 
 QVariantList WimaController::waypointPath() {
-  return const_cast<QVariantList &>(_currentWM->waypointsVariant());
+  return const_cast<QVariantList &>(_currentWM->currentWaypointsVariant());
 }
 
 Fact *WimaController::enableWimaController() { return &_enableWimaController; }
diff --git a/src/Wima/WimaPlaner.cc b/src/Wima/WimaPlaner.cc
index 9451bfaa7a..65896d1522 100644
--- a/src/Wima/WimaPlaner.cc
+++ b/src/Wima/WimaPlaner.cc
@@ -144,8 +144,8 @@ void WimaPlaner::setProgressLocked(bool l) {
     this->_progressLocked = l;
     emit progressLockedChanged();
     if (!this->_progressLocked) {
-      this->_measurementArea.setProgress(this->_nemoInterface.progress());
-      this->_update();
+      if (this->_measurementArea.setProgress(this->_nemoInterface.progress()))
+        this->_update();
     }
   }
 }
diff --git a/src/WimaView/WimaToolBar.qml b/src/WimaView/WimaToolBar.qml
index bb45e88dec..18ebb9405b 100644
--- a/src/WimaView/WimaToolBar.qml
+++ b/src/WimaView/WimaToolBar.qml
@@ -323,7 +323,7 @@ Rectangle {
                 Layout.columnSpan: 2
             }
 
-            QGCCheckBox {
+           QGCCheckBox {
                 property var nemo: wimaPlaner ? wimaPlaner.nemoInterface : undefined
 
                 text:               qsTr("Lock Progress")
@@ -336,12 +336,10 @@ Rectangle {
                         } else {
                             wimaPlaner.progressLocked = false
                         }
-                        checked = Qt.binding(function(){return wimaPlaner.progressLocked})
                     }
                 }
                 Layout.minimumWidth:    _mediumValueWidth
             }
-
         }
     }
 
-- 
GitLab