diff --git a/components/lazcontrols/spinex.inc b/components/lazcontrols/spinex.inc index e405070786..73bd0a228f 100644 --- a/components/lazcontrols/spinex.inc +++ b/components/lazcontrols/spinex.inc @@ -34,6 +34,9 @@ procedure TSpinEditExBase.UpdateControl; var ANumber: T; begin + {$ifdef debugspinex} + debugln(['TSpinEditExBase.UpdateControl: FSettingValue=',FSettingValue]); + {$endif} //if (MaxValue < MinValue) then FMaxValue := MinValue; if (FNullValueBehaviour <> nvbShowTextHint) then FValue := GetLimitedValue(FValue); @@ -253,7 +256,8 @@ begin FUpdatePending := True; UpdateControl; - FSettingValue := False; + if not (csLoading in ComponentState) then + FSettingValue := False; end; function TSpinEditExBase.GetValue: T; diff --git a/components/lazcontrols/spinex.pp b/components/lazcontrols/spinex.pp index dbc844637a..d1449601f6 100644 --- a/components/lazcontrols/spinex.pp +++ b/components/lazcontrols/spinex.pp @@ -71,13 +71,15 @@ unit SpinEx; interface +{.$define debugspinex} + uses Classes, SysUtils, Math, // LCL - LCLType, Controls, ClipBrd, ComCtrls, GroupedEdit, LResources; + LCLType, Controls, ClipBrd, ComCtrls, GroupedEdit, LResources + {$ifdef debugspinex}, LazLogger{$endif}; -{.$define debugspinex} type { TSpinEditExBase }