statistics/mobile: add variable2 operations combo-box

Copy paste of the other combo boxes.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-10 18:28:20 +01:00 committed by Dirk Hohndel
parent 9a0c5df744
commit 5cfa13694c
3 changed files with 37 additions and 0 deletions

View file

@ -51,14 +51,17 @@ void StatsManager::updateUi()
setBinnerList(uiState.binners1, binner1List, binner1Index);
setVariableList(uiState.var2, var2List, var2Index);
setBinnerList(uiState.binners2, binner2List, binner2Index);
setVariableList(uiState.operations2, operation2List, operation2Index);
var1ListChanged();
binner1ListChanged();
var2ListChanged();
binner2ListChanged();
operation2ListChanged();
var1IndexChanged();
binner1IndexChanged();
var2IndexChanged();
binner2IndexChanged();
operation2IndexChanged();
if (view)
view->plot(state);
@ -93,3 +96,12 @@ void StatsManager::var2BinnerChanged(int idx)
state.binner2Changed(idx);
updateUi();
}
void StatsManager::var2OperationChanged(int idx)
{
if (uiState.var2.variables.empty())
return;
idx = std::clamp(idx, 0, (int)uiState.operations2.variables.size());
state.var2OperationChanged(uiState.operations2.variables[idx].id);
updateUi();
}