From fce101ac82170aa3272db972a483f58051710ca4 Mon Sep 17 00:00:00 2001 From: blikblum Date: Fri, 23 Sep 2011 23:27:47 +0000 Subject: [PATCH] lcl: dont check to TDataLink.CanModify before calling Edit (not needed) git-svn-id: trunk@32478 - --- lcl/include/dbedit.inc | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lcl/include/dbedit.inc b/lcl/include/dbedit.inc index 0fdd287f4e..d7e3fa1645 100644 --- a/lcl/include/dbedit.inc +++ b/lcl/include/dbedit.inc @@ -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;