You've already forked lazarus-ccr
ExCtrls: Improved version of r8494.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8496 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -10,6 +10,9 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLVersion, Controls, SpinEx, Math;
|
Classes, SysUtils, LCLVersion, Controls, SpinEx, Math;
|
||||||
|
|
||||||
|
// Fix of issues #39490 (FPC >v3.2.2/64bit) and #39793 (Laz >= 2.3.0)
|
||||||
|
{$define SAMEVALUE_FIX}
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TCustomCurrEditEx }
|
{ TCustomCurrEditEx }
|
||||||
TSpinEditCurrencyFormat = (
|
TSpinEditCurrencyFormat = (
|
||||||
@ -57,7 +60,7 @@ type
|
|||||||
procedure EditKeyPress(var Key: char); override;
|
procedure EditKeyPress(var Key: char); override;
|
||||||
function SafeInc(AValue: Currency): Currency; override;
|
function SafeInc(AValue: Currency): Currency; override;
|
||||||
function SafeDec(AValue: Currency): Currency; override;
|
function SafeDec(AValue: Currency): Currency; override;
|
||||||
{$IF FPC_FullVersion>=30202}
|
{$IFDEF SAMEVALUE_FIX}
|
||||||
function SameValue(AValue1, AValue2: Currency): Boolean; override;
|
function SameValue(AValue1, AValue2: Currency): Boolean; override;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
function TextIsNumber(const S: String; out ANumber: Currency): Boolean; override;
|
function TextIsNumber(const S: String; out ANumber: Currency): Boolean; override;
|
||||||
@ -351,7 +354,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// Workaround for https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39490
|
// Workaround for https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39490
|
||||||
{$IF FPC_FullVersion>=30202}
|
// Required after https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39793
|
||||||
|
{$IFDEF SAMEVALUE_FIX}
|
||||||
function TCustomCurrSpinEditEx.SameValue(AValue1, AValue2: Currency): Boolean;
|
function TCustomCurrSpinEditEx.SameValue(AValue1, AValue2: Currency): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := (AValue1 = AValue2);
|
Result := (AValue1 = AValue2);
|
||||||
|
Reference in New Issue
Block a user