mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 06:08:17 +02:00
T(Float)SpinEditEx: fix setting (initial) value if NullValueBehaviour = nvbShowTextHint.
This commit is contained in:
parent
893885c9db
commit
5168d97f96
@ -34,6 +34,9 @@ procedure TSpinEditExBase.UpdateControl;
|
|||||||
var
|
var
|
||||||
ANumber: T;
|
ANumber: T;
|
||||||
begin
|
begin
|
||||||
|
{$ifdef debugspinex}
|
||||||
|
debugln(['TSpinEditExBase.UpdateControl: FSettingValue=',FSettingValue]);
|
||||||
|
{$endif}
|
||||||
//if (MaxValue < MinValue) then FMaxValue := MinValue;
|
//if (MaxValue < MinValue) then FMaxValue := MinValue;
|
||||||
if (FNullValueBehaviour <> nvbShowTextHint) then
|
if (FNullValueBehaviour <> nvbShowTextHint) then
|
||||||
FValue := GetLimitedValue(FValue);
|
FValue := GetLimitedValue(FValue);
|
||||||
@ -253,7 +256,8 @@ begin
|
|||||||
|
|
||||||
FUpdatePending := True;
|
FUpdatePending := True;
|
||||||
UpdateControl;
|
UpdateControl;
|
||||||
FSettingValue := False;
|
if not (csLoading in ComponentState) then
|
||||||
|
FSettingValue := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSpinEditExBase.GetValue: T;
|
function TSpinEditExBase.GetValue: T;
|
||||||
|
@ -71,13 +71,15 @@ unit SpinEx;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
|
{.$define debugspinex}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Math,
|
Classes, SysUtils, Math,
|
||||||
// LCL
|
// LCL
|
||||||
LCLType, Controls, ClipBrd, ComCtrls, GroupedEdit, LResources;
|
LCLType, Controls, ClipBrd, ComCtrls, GroupedEdit, LResources
|
||||||
|
{$ifdef debugspinex}, LazLogger{$endif};
|
||||||
|
|
||||||
|
|
||||||
{.$define debugspinex}
|
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TSpinEditExBase }
|
{ TSpinEditExBase }
|
||||||
|
Loading…
Reference in New Issue
Block a user