mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 11:30:28 +02:00
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:
parent
164e4b9b9f
commit
c3d5df753b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user