mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 03:48:27 +02:00
LCL: removed old workaround from TFloatSpinEdit. It worked around a bug which was fixed in FPC 2.4.0. Bug #18674.
git-svn-id: trunk@29397 -
This commit is contained in:
parent
de68945dc9
commit
5492a17fbb
@ -184,23 +184,9 @@ begin
|
||||
end;
|
||||
|
||||
function TCustomFloatSpinEdit.StrToValue(const S: String): Double;
|
||||
|
||||
// this is a workaround for the fpc rtl bug in StrToFloatDef function
|
||||
// which happens when DecimalSeparator = ThousandSeparator
|
||||
// (look at issue 0013293)
|
||||
function MyStrToFloatDef(S: String; Def: Double): Double;
|
||||
var
|
||||
V: Extended;
|
||||
begin
|
||||
if TextToFloat(PChar(S), V) then
|
||||
Result := V
|
||||
else
|
||||
Result := Def;
|
||||
end;
|
||||
|
||||
begin
|
||||
try
|
||||
Result := GetLimitedValue(MyStrToFloatDef(S, FValue));
|
||||
Result := GetLimitedValue(StrToFloatDef(S, FValue));
|
||||
except
|
||||
Result := FValue;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user