[poincare] PrintFloat: take into account the distinction between char

and glyph length in ConvertFloatToText
This commit is contained in:
Émilie Feral
2019-09-25 17:31:30 +02:00
committed by LeaNumworks
parent d6ad694b76
commit 4d593a6149
37 changed files with 153 additions and 124 deletions

View File

@@ -43,7 +43,7 @@ bool GraphControllerHelper::privateMoveCursorHorizontally(Shared::CurveViewCurso
void GraphControllerHelper::reloadDerivativeInBannerViewForCursorOnFunction(Shared::CurveViewCursor * cursor, Ion::Storage::Record record) {
ExpiringPointer<ContinuousFunction> function = App::app()->functionStore()->modelForRecord(record);
constexpr size_t bufferSize = FunctionBannerDelegate::k_maxNumberOfCharacters+PrintFloat::bufferSizeForFloatsWithPrecision(Preferences::LargeNumberOfSignificantDigits);
constexpr size_t bufferSize = FunctionBannerDelegate::k_maxNumberOfCharacters+PrintFloat::charSizeForFloatsWithPrecision(Preferences::LargeNumberOfSignificantDigits);
char buffer[bufferSize];
const char * space = " ";
int numberOfChar = function->derivativeNameWithArgument(buffer, bufferSize);