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

(cherry picked from commit 3692c658ae)
This commit is contained in:
Juha 2023-11-20 22:48:10 +02:00 committed by Maxim Ganetsky
parent d74ba1712b
commit 47c0cc06cb
2 changed files with 6 additions and 6 deletions

View File

@ -696,6 +696,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
@ -722,9 +725,6 @@ begin
Key := 0;
end
end;
if Key <> 0 then
inherited EditKeyDown(Key, Shift);
end;
end.

View File

@ -1270,6 +1270,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;
@ -1286,9 +1289,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;