Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ARPA-SIMC/CRITERIA1D
Browse files Browse the repository at this point in the history
  • Loading branch information
ftomei committed Jul 5, 2024
2 parents 4bc3518 + c1a0a14 commit 1e423b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions agrolib/criteria1DWidget/tabIrrigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ void TabIrrigation::tooltipLAI(QPointF point, bool isShow)
}
}


// TODO Giada
void TabIrrigation::tooltipEvapTransp(QPointF point, bool isShow)
{
if (isShow)
Expand Down
2 changes: 1 addition & 1 deletion agrolib/soilWidget/soilWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ void Crit3DSoilWidget::setDbSoil(QSqlDatabase dbOpened, QString soilCode)
// load default geotechnics parameters (not mandatory)
if (! loadGeotechnicsParameters(dbSoil, geotechnicsClassList, errorStr))
{
QMessageBox::warning(nullptr, "Warning", "loadGeotechnicsParameters\n" + errorStr);
QMessageBox::warning(nullptr, "Warning", "Failed to load geotecnical parameters for slope stability: missing reference db");
}

// read soil list
Expand Down
10 changes: 5 additions & 5 deletions agrolib/soilWidget/tabHorizons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ bool TabHorizons::checkDepths()
for (int horizonNum = 0; horizonNum<tableDb->rowCount(); horizonNum++)
{
//except first row
if ( horizonNum > 0)
if (horizonNum > 0)
{
if (mySoil->horizon[unsigned(horizonNum)].dbData.upperDepth != mySoil->horizon[horizonNum-1].dbData.lowerDepth)
{
Expand Down Expand Up @@ -366,12 +366,12 @@ bool TabHorizons::checkHorizonData(int horizonNum)
tableDb->item(horizonNum,9)->setBackground(Qt::red);
}

if (dbData->effectiveCohesion != NODATA && (dbData->effectiveCohesion < 0))
if (dbData->effectiveCohesion != NODATA && (dbData->effectiveCohesion < 0 || dbData->effectiveCohesion > 110))
{
tableDb->item(horizonNum,10)->setBackground(Qt::red);
}

if (dbData->frictionAngle != NODATA && (dbData->frictionAngle < 0))
if (dbData->frictionAngle != NODATA && (dbData->frictionAngle < 0 || dbData->frictionAngle > 50))
{
tableDb->item(horizonNum,11)->setBackground(Qt::red);
}
Expand Down Expand Up @@ -462,12 +462,12 @@ void TabHorizons::checkComputedValues(int horizonNum)
tableModel->item(horizonNum,5)->setBackground(Qt::yellow);
}

if (horizon->dbData.effectiveCohesion == NODATA)
if (abs(horizon->dbData.effectiveCohesion - horizon->effectiveCohesion) > EPSILON)
{
tableModel->item(horizonNum,11)->setBackground(Qt::yellow);
}

if (horizon->dbData.frictionAngle == NODATA)
if (abs(horizon->dbData.frictionAngle - horizon->frictionAngle) > EPSILON)
{
tableModel->item(horizonNum,12)->setBackground(Qt::yellow);
}
Expand Down

0 comments on commit 1e423b8

Please sign in to comment.