LazControls/TSpinEditExBase: IFDEF the previous commit (workaround for an already solved FPC bug). Issue #39490/39491.

This commit is contained in:
wp_xyz 2021-11-27 21:53:53 +01:00
parent 7f45938388
commit 5523c58bc9
2 changed files with 12 additions and 0 deletions

View File

@ -524,10 +524,13 @@ begin
Result := AValue - FIncrement;
end;
// Workaround for https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39490
{$IF FPC_FullVersion=30202}{$IFDEF Win64}
function TCustomFloatSpinEditEx.SameValue(AValue1, AValue2: Double): Boolean;
begin
Result := Math.SameValue(AValue1, AValue2);
end;
{$ENDIF}{$IFEND}
procedure TCustomFloatSpinEditEx.SetDecimals(ADecimals: Integer);
begin
@ -662,10 +665,13 @@ begin
Result := AValue - FIncrement;
end;
// Workaround for https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39490
{$IF FPC_FullVersion=30202}{$IFDEF Win64}
function TCustomSpinEditEx.SameValue(AValue1, AValue2: Int64): Boolean;
begin
Result := (AValue1 = AValue2);
end;
{$ENDIF}{$IFEND}
function TCustomSpinEditEx.TextIsNumber(const S: String; out ANumber: Int64
): Boolean;

View File

@ -141,7 +141,9 @@ type
procedure EditMouseWheelDown(Shift: TShiftState; MousePos: TPoint; var Handled: Boolean); override;
function SafeInc(AValue: T): T; virtual; abstract;
function SafeDec(AValue: T): T; virtual abstract;
{$IF FPC_FullVersion=30202}{$IFDEF Win64}
function SameValue(AValue1, AValue2: T): boolean; virtual; abstract;
{$ENDIF}{$IFEND}
procedure SetValue(const AValue: T); virtual;
procedure SetNullValue(AValue: T); virtual;
procedure SetMaxValue(const AValue: T); virtual;
@ -209,7 +211,9 @@ type
function TextIsNumber(const S: String; out ANumber: Double): Boolean; override;
function SafeInc(AValue: Double): Double; override;
function SafeDec(AValue: Double): Double; override;
{$IF FPC_FullVersion=30202}{$IFDEF Win64}
function SameValue(AValue1, AValue2: Double): Boolean; override;
{$ENDIF}{$IFEND}
procedure SetDecimals(ADecimals: Integer); virtual;
public
function ValueToStr(const AValue: Double): String; override;
@ -321,7 +325,9 @@ type
protected
function SafeInc(AValue: Int64): Int64; override;
function SafeDec(AValue: Int64): Int64; override;
{$IF FPC_FullVersion=30202}{$IFDEF Win64}
function SameValue(AValue1, AValue2: Int64): Boolean; override;
{$ENDIF}{$IFEND}
function TextIsNumber(const S: String; out ANumber: Int64): Boolean; override;
public
function ValueToStr(const AValue: Int64): String; override;