LCL, grids: pass the pressed key to the editor only if it came from the grid, this should prevent entering in a loop frezzing the program if the key was typed in the editor

git-svn-id: trunk@45276 -
This commit is contained in:
jesus 2014-06-01 01:46:15 +00:00
parent 164e4b9b9f
commit c3d5df753b

View File

@ -6804,6 +6804,8 @@ end;
procedure TCustomGrid.KeyPress(var Key: char);
begin
inherited KeyPress(Key);
if not EditorKey then
// we are interested in these keys only if they came from the grid
if not EditorMode and EditingAllowed(FCol) then begin
if (Key=#13) then begin
SelectEditor;
@ -7763,7 +7765,7 @@ begin
KeyPress(Key); // grid must get all keypresses, even if they are from the editor
{$ifdef dbgGrid}DebugLn('Grid.EditorKeyPress: inter Key=',PrintKey);{$Endif}
case Key of
^C,^V,^X:;
#0, ^C,^V,^X:;
^M:
begin