[apps/statistics] Remove too strict condition

One could not set the bin with / x start to a value that would not show
any data
-> The condition was asymetrical, as nextFirstDrawnBarAbscissa could not
be higher to the biggest data, but could have been too small to display
any data
-> We restricted the user
This commit is contained in:
Léa Saviot
2020-02-10 14:26:19 +01:00
committed by Émilie Feral
parent 59aea9ca83
commit 51b5edbe69

View File

@@ -50,21 +50,6 @@ bool HistogramParameterController::setParameterAtIndex(int parameterIndex, doubl
const double nextFirstDrawnBarAbscissa = setBarWidth ? m_store->firstDrawnBarAbscissa() : value;
const double nextBarWidth = setBarWidth ? value : m_store->barWidth();
{
// There should be at least one value in the drawn bin
bool foundOneDrawnValue = false;
for (int i = 0; i < DoublePairStore::k_numberOfSeries; i++) {
if (nextFirstDrawnBarAbscissa <= m_store->maxValue(i) + nextBarWidth) {
foundOneDrawnValue = true;
break;
}
}
if (!foundOneDrawnValue) {
Container::activeApp()->displayWarning(I18n::Message::ForbiddenValue);
return false;
}
}
// The number of bars cannot be above the max
assert(DoublePairStore::k_numberOfSeries > 0);
for (int i = 0; i < DoublePairStore::k_numberOfSeries; i++) {