mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-24 10:19:18 +02:00
LCL: spin: cleanup
git-svn-id: trunk@57650 -
This commit is contained in:
parent
c7ce7e191e
commit
64bd083a42
@ -129,13 +129,12 @@ end;
|
||||
|
||||
procedure TCustomFloatSpinEdit.SetValue(const AValue: Double);
|
||||
var
|
||||
ValueFromText: Extended;
|
||||
OldValue: Double;
|
||||
ValueFromText, OldValue: Double;
|
||||
begin
|
||||
if (FValue = AValue)
|
||||
if SameValue(FValue, AValue)
|
||||
//if you set text by code (or paste it) and text is not a valid float, then FValue will hold the previous value
|
||||
//and in that case we should not exit here...
|
||||
and (TryStrToFloat(Text, ValueFromText) and (ValueFromText = FValue)) then Exit;
|
||||
and (TryStrToFloat(Text, ValueFromText) and SameValue(ValueFromText, FValue)) then Exit;
|
||||
OldValue := FValue;
|
||||
FValue := AValue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user