Skip to content

Commit

Permalink
Another fix for method totalLengthIsChanging:
Browse files Browse the repository at this point in the history
  • Loading branch information
epernod committed Aug 31, 2023
1 parent 6385f6e commit 8e7dc51
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -958,12 +958,12 @@ void InterventionalRadiologyController<DataTypes>::totalLengthIsChanging(const t
if (fabs(dLength) <= d_threshold.getValue())
return;

for (unsigned int i = newTable.size() - 1; i > 0; --i)
for (unsigned int i = 0; i < newTable.size(); i++)
{
if (newTable[i].size() == 1)
{
modifiedNodeCurvAbs[i] -= dLength;
if (modifiedNodeCurvAbs[i] < modifiedNodeCurvAbs[i - 1])
if (i > 1 && modifiedNodeCurvAbs[i] < modifiedNodeCurvAbs[i - 1])
{
modifiedNodeCurvAbs[i] = modifiedNodeCurvAbs[i - 1];
}
Expand Down

0 comments on commit 8e7dc51

Please sign in to comment.