[apps] Add angle unit preference in apps

Change-Id: I25eb760883d164563cb3059d73e8d1fff92ad6da
This commit is contained in:
Émilie Feral
2017-02-01 16:59:54 +01:00
parent e4d08ee685
commit 39dab5125c
12 changed files with 42 additions and 24 deletions

View File

@@ -34,7 +34,7 @@ void FloatParameterController::willDisplayCellForIndex(TableViewCell * cell, int
bool FloatParameterController::textFieldDidFinishEditing(TextField * textField, const char * text) {
AppsContainer * appsContainer = (AppsContainer *)app()->container();
Context * globalContext = appsContainer->globalContext();
float floatBody = Expression::parse(text)->approximate(*globalContext);
float floatBody = Expression::parse(text)->approximate(*globalContext, appsContainer->preferences()->angleUnit());
setParameterAtIndex(m_selectableTableView.selectedRow(), floatBody);
willDisplayCellForIndex(m_selectableTableView.cellAtLocation(m_selectableTableView.selectedColumn(),
m_selectableTableView.selectedRow()), activeCell());