mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:59:31 +02:00
TFloatSpinEdit(Ex): fix crash in OI when setting MaxValue/MinValue/Increment. Issue #39792.
This commit is contained in:
parent
4a30435502
commit
95cfa51d1b
@ -213,12 +213,12 @@ end;
|
||||
|
||||
function TSpinEditExBase.MaxValueStored: Boolean;
|
||||
begin
|
||||
Result := not SameValue(FMaxValue, DefMaxValue);
|
||||
Result := not SameValue(FMaxValue, T(DefMaxValue)); //use typecast to force use of correct overload. Issue #39792
|
||||
end;
|
||||
|
||||
function TSpinEditExBase.MinValueStored: Boolean;
|
||||
begin
|
||||
Result := not SameValue(FMinValue, DefMinValue);
|
||||
Result := not SameValue(FMinValue, T(DefMinValue)); //use typecast to force use of correct overload. Issue #39792
|
||||
end;
|
||||
|
||||
procedure TSpinEditExBase.EditMouseWheelUp(Shift: TShiftState;
|
||||
|
@ -119,7 +119,7 @@ end;
|
||||
|
||||
function TCustomFloatSpinEdit.MaxValueStored: Boolean;
|
||||
begin
|
||||
Result := not SameValue(FMaxValue, DefMaxValue);
|
||||
Result := not SameValue(FMaxValue, Double(DefMaxValue)); //use typecast to force use of correct overload. Issue #39792
|
||||
end;
|
||||
|
||||
procedure TCustomFloatSpinEdit.KeyPress(var Key: char);
|
||||
@ -193,7 +193,7 @@ end;
|
||||
|
||||
function TCustomFloatSpinEdit.IncrementStored: Boolean;
|
||||
begin
|
||||
Result := not SameValue(FIncrement, DefIncrement);
|
||||
Result := not SameValue(FIncrement, Double(DefIncrement)); //use typecast to force use of correct overload. Issue #39792
|
||||
end;
|
||||
|
||||
procedure TCustomFloatSpinEdit.SetDecimals(ADecimals: Integer);
|
||||
|
Loading…
Reference in New Issue
Block a user