From 8cbb74a13e3e044342e2815f695b369db808ba94 Mon Sep 17 00:00:00 2001 From: Valentin Platzgummer Date: Wed, 14 Oct 2020 21:31:43 +0200 Subject: [PATCH] race cond lambda removed from wima planer --- src/Wima/WimaPlaner.cc | 11 +++++++---- src/Wima/WimaPlaner.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Wima/WimaPlaner.cc b/src/Wima/WimaPlaner.cc index 53c5037d4..77fdd0211 100644 --- a/src/Wima/WimaPlaner.cc +++ b/src/Wima/WimaPlaner.cc @@ -61,10 +61,8 @@ WimaPlaner::WimaPlaner(QObject *parent) #endif // NemoInterface - connect(&this->_nemoInterface, &NemoInterface::progressChanged, [this] { - this->_measurementArea.setProgress(this->_nemoInterface.progress()); - this->_update(); - }); + connect(&this->_nemoInterface, &NemoInterface::progressChanged, this, + &WimaPlaner::nemoInterfaceProgressChangedHandler); // StateMachine connect(this->_stateMachine.get(), &StateMachine::upToDateChanged, this, @@ -558,6 +556,11 @@ void WimaPlaner::missionControllerMissionItemCountChangedHandler() { missionControllerVisualItemsChangedHandler(); } +void WimaPlaner::nemoInterfaceProgressChangedHandler() { + this->_measurementArea.setProgress(this->_nemoInterface.progress()); + this->_update(); +} + void WimaPlaner::saveToCurrent() { saveToFile(_currentFile); } void WimaPlaner::saveToFile(const QString &filename) { diff --git a/src/Wima/WimaPlaner.h b/src/Wima/WimaPlaner.h index f8f7e788b..c57d6238a 100644 --- a/src/Wima/WimaPlaner.h +++ b/src/Wima/WimaPlaner.h @@ -139,6 +139,7 @@ private slots: void missionControllerWaypointPathChangedHandler(); void missionControllerNewItemsFromVehicleHandler(); void missionControllerMissionItemCountChangedHandler(); + void nemoInterfaceProgressChangedHandler(); #ifndef NDEBUG void autoLoadMission(void); -- 2.22.0