mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Set focus on mouse click (Lazarus 3.x)
This commit is contained in:
parent
26023ec1ed
commit
e2cf8a099d
1 changed files with 13 additions and 5 deletions
|
|
@ -266,9 +266,18 @@ begin
|
|||
|
||||
FFileView.FMainControlMouseDown := True;
|
||||
|
||||
AllowOutboundEvents := False;
|
||||
inherited MouseDown(Button, Shift, X, Y);
|
||||
AllowOutboundEvents := True;
|
||||
if MouseOnGrid(X, Y) then
|
||||
inherited MouseDown(Button, Shift, X, Y)
|
||||
else begin
|
||||
if Assigned(OnMouseDown) then
|
||||
begin
|
||||
OnMouseDown(Self, Button, Shift, X, Y);
|
||||
end;
|
||||
if not Focused then
|
||||
begin
|
||||
if CanSetFocus then SetFocus;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFileViewGrid.MouseUp(Button: TMouseButton; Shift: TShiftState; X,
|
||||
|
|
@ -295,9 +304,7 @@ begin
|
|||
if not FFileView.FMainControlMouseDown then
|
||||
Exit;
|
||||
|
||||
AllowOutboundEvents := False;
|
||||
inherited MouseUp(Button, Shift, X, Y);
|
||||
AllowOutboundEvents := True;
|
||||
|
||||
FFileView.FMainControlMouseDown := False;
|
||||
|
||||
|
|
@ -503,6 +510,7 @@ begin
|
|||
DoubleBuffered := True;
|
||||
Align := alClient;
|
||||
MouseWheelOption:= mwGrid;
|
||||
AllowOutboundEvents := False;
|
||||
Options := [goTabs, goThumbTracking];
|
||||
TabStop := False;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue