float trash
This commit is contained in:
@ -6,12 +6,13 @@ void UMagicFloatInput::HandleOnTextCommitted(
|
||||
FText const & inText,
|
||||
ETextCommit::Type inCommitMethod
|
||||
) {
|
||||
double x = 0.0;
|
||||
if (inText.IsEmptyOrWhitespace()) {
|
||||
if (sourceInput != nullptr) {
|
||||
SetText(sourceInput->GetText());
|
||||
} else {
|
||||
auto x = FCString::Atof(*inText.ToString());
|
||||
SetText(FText::FromString(FString::Printf(TEXT("%.7f"), x)));
|
||||
x = FCString::Atod(*sourceInput->GetText().ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
x = FCString::Atod(*inText.ToString());
|
||||
|
||||
SetText(FText::FromString(FString::Printf(TEXT("%.7f"), x)));
|
||||
}
|
||||
|
Reference in New Issue
Block a user