mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/statistics] Throw an error when the user set a negative value as
bin width Change-Id: I0203ce403e469f4616af74399e451f6ed41d3024
This commit is contained in:
@@ -32,6 +32,10 @@ float HistogramParameterController::parameterAtIndex(int index) {
|
||||
void HistogramParameterController::setParameterAtIndex(int parameterIndex, float f) {
|
||||
assert(parameterIndex >= 0 && parameterIndex < 2);
|
||||
if (parameterIndex == 0) {
|
||||
if (f <= 0.0f) {
|
||||
app()->displayWarning("Value interdite");
|
||||
return;
|
||||
}
|
||||
m_data->setBinWidth(f);
|
||||
} else {
|
||||
m_data->setMinValue(f);
|
||||
|
||||
Reference in New Issue
Block a user