From 92506689cc5a05467e121356cb70bd067bfd6518 Mon Sep 17 00:00:00 2001 From: Valentin Platzgummer 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 671a3ccdc..9b0927aee 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 a35e2462b..7a9aa89ff 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(&_currentWM->missionItems()); + return const_cast(&_currentWM->currentMissionItems()); } QVariantList WimaController::waypointPath() { - return const_cast(_currentWM->waypointsVariant()); + return const_cast(_currentWM->currentWaypointsVariant()); } Fact *WimaController::enableWimaController() { return &_enableWimaController; } diff --git a/src/Wima/WimaPlaner.cc b/src/Wima/WimaPlaner.cc index 9451bfaa7..65896d152 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 bb45e88de..18ebb9405 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 } - } } -- 2.22.0