Fixed: incorrect format display

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2852 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
jujibo
2013-11-27 10:33:53 +00:00
parent eda11d6bf8
commit e43cc06e92

View File

@ -157,7 +157,9 @@ end;
procedure TJLabeledIntegerEdit.FormatInput;
begin
if not fNull then
if fNull and (theValue = Low(integer)) then
Text := ''
else
Text := FormatFloat(fFormat, theValue);
end;
@ -177,7 +179,7 @@ begin
if ReadOnly then
exit;
if fNull and (Length(Caption) = 0) then
theValue:= Low(Integer) // min integer value means null
theValue := Low(integer) // min integer value means null
else
if IsValidInteger(Text) then
theValue := StrToInt(Text)
@ -212,7 +214,7 @@ end;
function TJLabeledIntegerEdit.isNull: boolean;
begin
Result:= theValue = Low(Integer);
Result := theValue = Low(integer);
end;
end.