ExCtrls: use Abs() of LValue, not of AValue in TCustomFloatSISpinEditEx.ValueToStr

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7612 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
lazarus-bart 2020-08-17 20:15:42 +00:00
parent c9f05e0289
commit d689407c6f

View File

@ -559,14 +559,15 @@ end;
function TCustomFloatSISpinEditEx.ValueToStr(const AValue: Double): String;
var
Prefix: TSIPrefix;
LValue, Factor: Double;
LValue, AbsLValue, Factor: Double;
fs: TFormatSettings;
begin
LValue := GetLimitedValue(AValue);
AbsLValue := Abs(LValue);
for Prefix := Low(SIFactors) to High(SIFactors) do
begin
Factor := SIFactors[Prefix];
if (abs(AValue) >= Factor) then
if (AbsLValue >= Factor) then
begin
{$IF LCL_FullVersion < 2010000}
fs := DefaultFormatSettings;