mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Put the method preference in container instead of in every app
Change-Id: Ib390952a6559aa847c99e3ca74c4f6995a07e909
This commit is contained in:
@@ -122,8 +122,8 @@ int ValuesController::numberOfColumns() {
|
||||
}
|
||||
|
||||
void ValuesController::willDisplayCellAtLocation(TableViewCell * cell, int i, int j) {
|
||||
App * graphApp = (Graph::App *)app();
|
||||
willDisplayCellAtLocationWithDisplayMode(cell, i, j, graphApp->preferences()->displayMode());
|
||||
AppsContainer * myContainer = (AppsContainer *)app()->container();
|
||||
willDisplayCellAtLocationWithDisplayMode(cell, i, j, myContainer->preferences()->displayMode());
|
||||
if (cellAtLocationIsEditable(i, j)) {
|
||||
return;
|
||||
}
|
||||
@@ -165,11 +165,12 @@ void ValuesController::willDisplayCellAtLocation(TableViewCell * cell, int i, in
|
||||
// The cell is a value cell
|
||||
EvenOddBufferTextCell * myValueCell = (EvenOddBufferTextCell *)cell;
|
||||
Function * function = functionAtColumn(i);
|
||||
App * graphApp = (Graph::App *)app();
|
||||
float x = m_interval.element(j-1);
|
||||
if (isDerivativeColumn(i)) {
|
||||
Float(function->approximateDerivative(x, graphApp->localContext())).convertFloatToText(buffer, Float::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, graphApp->preferences()->displayMode());
|
||||
Float(function->approximateDerivative(x, graphApp->localContext())).convertFloatToText(buffer, Float::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, myContainer->preferences()->displayMode());
|
||||
} else {
|
||||
Float(function->evaluateAtAbscissa(x, graphApp->localContext())).convertFloatToText(buffer, Float::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, graphApp->preferences()->displayMode());
|
||||
Float(function->evaluateAtAbscissa(x, graphApp->localContext())).convertFloatToText(buffer, Float::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, myContainer->preferences()->displayMode());
|
||||
}
|
||||
myValueCell->setText(buffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user