mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 16:57:31 +01:00
[poincare][apps] Make preferences a const object accessible from
anywhere (poincare and apps) Change-Id: I49cc6bf940d1efeb6b153daac949ffcb23999a8d
This commit is contained in:
@@ -31,14 +31,14 @@ int FloatParameterController::activeCell() {
|
||||
void FloatParameterController::willDisplayCellForIndex(TableViewCell * cell, int index) {
|
||||
EditableTextMenuListCell * myCell = (EditableTextMenuListCell *) cell;
|
||||
char buffer[Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits)];
|
||||
Complex::convertFloatToText(parameterAtIndex(index), buffer, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, Expression::FloatDisplayMode::Auto);
|
||||
Complex::convertFloatToText(parameterAtIndex(index), buffer, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, Expression::FloatDisplayMode::Decimal);
|
||||
myCell->setAccessoryText(buffer);
|
||||
}
|
||||
|
||||
bool FloatParameterController::textFieldDidFinishEditing(TextField * textField, const char * text) {
|
||||
AppsContainer * appsContainer = ((TextFieldDelegateApp *)app())->container();
|
||||
Context * globalContext = appsContainer->globalContext();
|
||||
float floatBody = Expression::parse(text)->approximate(*globalContext, appsContainer->preferences()->angleUnit());
|
||||
float floatBody = Expression::parse(text)->approximate(*globalContext);
|
||||
setParameterAtIndex(m_selectableTableView.selectedRow(), floatBody);
|
||||
willDisplayCellForIndex(m_selectableTableView.cellAtLocation(m_selectableTableView.selectedColumn(),
|
||||
m_selectableTableView.selectedRow()), activeCell());
|
||||
|
||||
Reference in New Issue
Block a user