LCL, LazControls: Fix order of calling OnKeyDown in FilterEdit controls. Issue #40601, patch by n7800.

This commit is contained in:
Juha 2023-11-20 22:48:10 +02:00
parent 764415b6a0
commit 3692c658ae
2 changed files with 6 additions and 6 deletions

View File

@ -714,6 +714,9 @@ procedure TTreeFilterEdit.EditKeyDown(var Key: Word; Shift: TShiftState);
end;
//
begin
inherited EditKeyDown(Key, Shift);
if Key = 0 then exit;
if fFilteredTreeview <> nil then
begin
// current node
@ -740,9 +743,6 @@ begin
Key := 0;
end
end;
if Key <> 0 then
inherited EditKeyDown(Key, Shift);
end;
end.

View File

@ -1277,6 +1277,9 @@ end;
procedure TCustomControlFilterEdit.EditKeyDown(var Key: Word; Shift: TShiftState);
begin
inherited EditKeyDown(Key, Shift);
if Key = 0 then exit;
if Shift = [] then
case Key of
VK_RETURN: if ReturnKeyHandled then Key := 0;
@ -1293,9 +1296,6 @@ begin
VK_HOME: begin MoveHome(ssShift in Shift); Key := 0; end;
VK_END: begin MoveEnd (ssShift in Shift); Key := 0; end;
end;
if Key <> 0 then
inherited EditKeyDown(Key, Shift);
end;
procedure TCustomControlFilterEdit.EditChange;