Grid: support negative ground/obstacle height thresholds

This commit is contained in:
matlabbe
2017-06-12 11:48:13 -04:00
parent 9554597948
commit bbaac8b2b1
4 changed files with 29 additions and 13 deletions

View File

@@ -402,6 +402,15 @@ void ParametersToolBox::addParameter(QVBoxLayout * layout,
widget->setMinimum(def*1000000.0);
widget->setMaximum(0.0);
}
// set minimum for selected parameters
if(key.compare(Parameters::kGridMinGroundHeight().c_str()) == 0 ||
key.compare(Parameters::kGridMaxGroundHeight().c_str()) == 0 ||
key.compare(Parameters::kGridMaxObstacleHeight().c_str()) == 0)
{
widget->setMinimum(-1000000.0);
}
widget->setValue(value);
widget->setObjectName(key);
connect(widget, SIGNAL(editingFinished()), this, SLOT(changeParameter()));