[apps/probability] Display an error modal when the parameter is out of

the domain

Change-Id: I47ea5bbf4ac516d9cd876f546b606e3377c621f7
This commit is contained in:
Émilie Feral
2016-12-15 15:36:48 +01:00
parent dbc9b3d567
commit becf0603e1
12 changed files with 55 additions and 0 deletions

View File

@@ -178,6 +178,10 @@ float ParametersController::parameterAtIndex(int index) {
}
void ParametersController::setParameterAtIndex(int parameterIndex, float f) {
if (!m_law->authorizedValueAtIndex(f, parameterIndex)) {
app()->displayWarning("Cette valeur est interdite !");
return;
}
m_law->setParameterAtIndex(f, parameterIndex);
}