[apps/shared] Clip displayed range in graph view in interactive curve

view range

Change-Id: I4654a1f9c06420d6ade8a86a13c0d89f025f324f
This commit is contained in:
Émilie Feral
2017-03-17 16:42:44 +01:00
parent eb4a217e0d
commit dc6acc0d48
19 changed files with 105 additions and 41 deletions

View File

@@ -50,17 +50,18 @@ float HistogramParameterController::previousParameterAtIndex(int index) {
return m_previousParameters[index];
}
void HistogramParameterController::setParameterAtIndex(int parameterIndex, float f) {
bool HistogramParameterController::setParameterAtIndex(int parameterIndex, float f) {
assert(parameterIndex >= 0 && parameterIndex < 2);
if (parameterIndex == 0) {
if (f <= 0.0f) {
app()->displayWarning(I18n::Message::ForbiddenValue);
return;
return false;
}
m_store->setBarWidth(f);
} else {
m_store->setFirstDrawnBarAbscissa(f);
}
return true;
}
HighlightCell * HistogramParameterController::reusableParameterCell(int index, int type) {