mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-20 14:20:39 +01:00
[poincare] PrintFloat: take into account the distinction between char
and glyph length in ConvertFloatToText
This commit is contained in:
committed by
LeaNumworks
parent
d6ad694b76
commit
4d593a6149
@@ -78,7 +78,7 @@ void EditableCellTableViewController::willDisplayCellAtLocationWithDisplayMode(H
|
||||
if (cellAtLocationIsEditable(i, j)) {
|
||||
EvenOddEditableTextCell * myEditableValueCell = (EvenOddEditableTextCell *)cell;
|
||||
assert(!myEditableValueCell->editableTextCell()->textField()->isEditing());
|
||||
const int bufferSize = PrintFloat::bufferSizeForFloatsWithPrecision(Preferences::LargeNumberOfSignificantDigits);
|
||||
const int bufferSize = PrintFloat::charSizeForFloatsWithPrecision(Preferences::LargeNumberOfSignificantDigits);
|
||||
char buffer[bufferSize];
|
||||
// Special case 1: last row
|
||||
if (j == numberOfElementsInColumn(i) + 1) {
|
||||
@@ -86,7 +86,7 @@ void EditableCellTableViewController::willDisplayCellAtLocationWithDisplayMode(H
|
||||
* data */
|
||||
buffer[0] = 0;
|
||||
} else {
|
||||
PrintFloat::ConvertFloatToText<double>(dataAtLocation(i, j), buffer, bufferSize, Preferences::LargeNumberOfSignificantDigits, floatDisplayMode);
|
||||
PoincareHelpers::ConvertFloatToTextWithDisplayMode<double>(dataAtLocation(i, j), buffer, bufferSize, Preferences::LargeNumberOfSignificantDigits, floatDisplayMode);
|
||||
}
|
||||
myEditableValueCell->editableTextCell()->textField()->setText(buffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user