From b65484eca914fc4065b56c5fc79a7afa6df8b21e Mon Sep 17 00:00:00 2001 From: giadasan Date: Fri, 5 Jul 2024 16:11:26 +0200 Subject: [PATCH] fix soil model table --- agrolib/criteria1DWidget/tabIrrigation.cpp | 2 -- agrolib/soilWidget/tabHorizons.cpp | 9 ++++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/agrolib/criteria1DWidget/tabIrrigation.cpp b/agrolib/criteria1DWidget/tabIrrigation.cpp index d07a1759..8d64d5a3 100644 --- a/agrolib/criteria1DWidget/tabIrrigation.cpp +++ b/agrolib/criteria1DWidget/tabIrrigation.cpp @@ -253,8 +253,6 @@ void TabIrrigation::tooltipLAI(QPointF point, bool isShow) } } - -// TODO Giada void TabIrrigation::tooltipEvapTransp(QPointF point, bool isShow) { if (isShow) diff --git a/agrolib/soilWidget/tabHorizons.cpp b/agrolib/soilWidget/tabHorizons.cpp index b721b63c..eed115fa 100644 --- a/agrolib/soilWidget/tabHorizons.cpp +++ b/agrolib/soilWidget/tabHorizons.cpp @@ -462,15 +462,14 @@ void TabHorizons::checkComputedValues(int horizonNum) tableModel->item(horizonNum,5)->setBackground(Qt::yellow); } - // for soil mechanics parameters just check if is missing - if (horizon->geotechnics.effectiveCohesion == NODATA) + if (abs(horizon->dbData.effectiveCohesion - horizon->effectiveCohesion) > EPSILON) { - tableModel->item(horizonNum,11)->setBackground(Qt::red); + tableModel->item(horizonNum,11)->setBackground(Qt::yellow); } - if (horizon->geotechnics.frictionAngle == NODATA) + if (abs(horizon->dbData.frictionAngle - horizon->frictionAngle) > EPSILON) { - tableModel->item(horizonNum,12)->setBackground(Qt::red); + tableModel->item(horizonNum,12)->setBackground(Qt::yellow); } }