mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-24 00:27:06 +02:00
T(Float)SpinEditEx: set make sure Modified is correct in OnChange event as well.
This commit is contained in:
parent
abd3cd5c6b
commit
e868afe133
@ -139,6 +139,14 @@ begin
|
|||||||
{$ifdef debugspinex}
|
{$ifdef debugspinex}
|
||||||
debugln('TSpinEditExBase.EditChange');
|
debugln('TSpinEditExBase.EditChange');
|
||||||
{$endif}
|
{$endif}
|
||||||
|
if FMustSetModifiedToTrueInOnChange then
|
||||||
|
begin
|
||||||
|
Modified := True;
|
||||||
|
FMustSetModifiedToTrueInOnChange := False;
|
||||||
|
{$ifdef debugspinex}
|
||||||
|
debugln('FMustSetModifiedToTrue=True, Setting Modifed to True');
|
||||||
|
{$endif}
|
||||||
|
end;
|
||||||
inherited EditChange;
|
inherited EditChange;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -304,7 +312,9 @@ begin
|
|||||||
NewValue := GetLimitedValue(SafeDec(OldValue));
|
NewValue := GetLimitedValue(SafeDec(OldValue));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
FMustSetModifiedToTrueInOnChange := True;
|
||||||
SetValue(NewValue);
|
SetValue(NewValue);
|
||||||
|
//RealSetText of the Edit will set it to False
|
||||||
Modified := True;
|
Modified := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -328,7 +338,7 @@ end;
|
|||||||
constructor TSpinEditExBase.Create(TheOwner: TComponent);
|
constructor TSpinEditExBase.Create(TheOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
|
FMustSetModifiedToTrueInOnChange := False;
|
||||||
FArrowKeys := True;
|
FArrowKeys := True;
|
||||||
FIncrement := DefIncrement;
|
FIncrement := DefIncrement;
|
||||||
FMaxValue := DefMaxValue;
|
FMaxValue := DefMaxValue;
|
||||||
|
Loading…
Reference in New Issue
Block a user