mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[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:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user