mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 10:19:38 +02:00
lcl: dont check to TDataLink.CanModify before calling Edit (not needed)
git-svn-id: trunk@32478 -
This commit is contained in:
parent
90dd407ee2
commit
fce101ac82
@ -118,9 +118,7 @@ begin
|
||||
Key := VK_UNKNOWN;
|
||||
end else
|
||||
if Key in [VK_DELETE, VK_BACK] then begin
|
||||
if FDataLink.CanModify then
|
||||
FDatalink.Edit
|
||||
else
|
||||
if not FDataLink.Edit then
|
||||
Key := VK_UNKNOWN;
|
||||
end;
|
||||
end;
|
||||
@ -143,15 +141,11 @@ begin
|
||||
begin
|
||||
case Key of
|
||||
#8: // special keys
|
||||
if FDataLink.CanModify then
|
||||
FDatalink.Edit
|
||||
else
|
||||
if not FDatalink.Edit then
|
||||
Key:=#0;
|
||||
|
||||
#32..#255: //standard keys
|
||||
if FDataLink.CanModify and FieldCanAcceptKey(FDataLink.Field, Key) then
|
||||
FDatalink.Edit
|
||||
else
|
||||
if not FieldCanAcceptKey(FDataLink.Field, Key) or not FDatalink.Edit then
|
||||
Key:=#0;
|
||||
end;//case
|
||||
end
|
||||
@ -159,10 +153,9 @@ begin
|
||||
begin
|
||||
case SavedKey of
|
||||
#8: // special keys
|
||||
if FDataLink.CanModify then
|
||||
FDatalink.Edit;
|
||||
FDatalink.Edit;
|
||||
#32..#255: //standard keys
|
||||
if FDataLink.CanModify and FieldCanAcceptKey(FDataLink.Field, SavedKey) then
|
||||
if FieldCanAcceptKey(FDataLink.Field, SavedKey) then
|
||||
FDatalink.Edit;
|
||||
end;//case
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user