mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 06:08:17 +02:00
TFloatSpinEdit: fix updating control in SetValue (issue #0026488)
git-svn-id: trunk@46005 -
This commit is contained in:
parent
a469a64f53
commit
33b12a6ca4
@ -113,8 +113,13 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCustomFloatSpinEdit.SetValue(const AValue: Double);
|
||||
var
|
||||
ValueFromText: Extended;
|
||||
begin
|
||||
if FValue = AValue then Exit;
|
||||
if (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;
|
||||
FValue := AValue;
|
||||
|
||||
// clear FValueChanged to prevent getting the old value from the widget
|
||||
|
Loading…
Reference in New Issue
Block a user