mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Fix VariableBoxController references to Matrix
This commit is contained in:
@@ -151,12 +151,12 @@ void VariableBoxController::ContentViewController::willDisplayCellForIndex(Highl
|
||||
/* TODO: implement list contexts */
|
||||
// TODO: handle matrix and scalar!
|
||||
LayoutRef layoutR = layoutRefForIndex(index);
|
||||
const Matrix * matrixEvaluation = static_cast<const Matrix *>(evaluation);
|
||||
const Matrix matrixEvaluation = Matrix(static_cast<const MatrixNode *>(evaluation.node()));
|
||||
myCell->setLayoutRef(layoutR);
|
||||
char buffer[2*PrintFloat::bufferSizeForFloatsWithPrecision(2)+1];
|
||||
int numberOfChars = PrintFloat::convertFloatToText<float>(matrixEvaluation->numberOfRows(), buffer, PrintFloat::bufferSizeForFloatsWithPrecision(2), 2, Preferences::PrintFloatMode::Decimal);
|
||||
int numberOfChars = PrintFloat::convertFloatToText<float>(matrixEvaluation.numberOfRows(), buffer, PrintFloat::bufferSizeForFloatsWithPrecision(2), 2, Preferences::PrintFloatMode::Decimal);
|
||||
buffer[numberOfChars++] = 'x';
|
||||
PrintFloat::convertFloatToText<float>(matrixEvaluation->numberOfColumns(), buffer+numberOfChars, PrintFloat::bufferSizeForFloatsWithPrecision(2), 2, Preferences::PrintFloatMode::Decimal);
|
||||
PrintFloat::convertFloatToText<float>(matrixEvaluation.numberOfColumns(), buffer+numberOfChars, PrintFloat::bufferSizeForFloatsWithPrecision(2), 2, Preferences::PrintFloatMode::Decimal);
|
||||
myCell->setSubtitle(buffer);
|
||||
} else {
|
||||
myCell->setLayoutRef(LayoutRef(nullptr));
|
||||
|
||||
Reference in New Issue
Block a user