Fix bugs and code refactoring

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2853 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
jujibo
2013-11-27 11:27:42 +00:00
parent e43cc06e92
commit 625cb24459

View File

@ -157,7 +157,7 @@ end;
procedure TJLabeledIntegerEdit.FormatInput;
begin
if fNull and (theValue = Low(integer)) then
if isNull then
Text := ''
else
Text := FormatFloat(fFormat, theValue);
@ -168,7 +168,7 @@ begin
inherited DoEnter;
if ReadOnly then
exit;
if not fNull then
if not isNull then
Text := IntToStr(theValue);
SelectAll;
end;
@ -214,7 +214,7 @@ end;
function TJLabeledIntegerEdit.isNull: boolean;
begin
Result := theValue = Low(integer);
Result := fNull and (theValue = Low(integer));
end;
end.