mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Deselecting file with right mouse button after context menu has been shown.
This commit is contained in:
parent
382698bebd
commit
87a848d17d
1 changed files with 10 additions and 5 deletions
|
|
@ -1126,16 +1126,21 @@ begin
|
|||
// show context menu
|
||||
MousePoint:= dgPanel.ScreenToClient(Mouse.CursorPos);
|
||||
Background:= not dgPanel.MouseOnGrid(MousePoint.x, MousePoint.y);
|
||||
frmMain.Commands.DoContextMenu(Self, Mouse.CursorPos.x, Mouse.CursorPos.y, Background);
|
||||
|
||||
if not Background then
|
||||
begin
|
||||
// get current row
|
||||
dgPanel.MouseToCell(MousePoint.x, MousePoint.y, iCol, iRow);
|
||||
if iRow < dgPanel.FixedRows then Exit;
|
||||
AFile := FFiles[iRow - dgPanel.FixedRows]; // get current file
|
||||
MarkFile(AFile, False); // unselect file
|
||||
dgPanel.InvalidateRow(iRow); // invalidate current row
|
||||
if iRow >= dgPanel.FixedRows then
|
||||
begin
|
||||
AFile := FFiles[iRow - dgPanel.FixedRows]; // get current file
|
||||
MarkFile(AFile, not FLastSelectionState);
|
||||
UpdateInfoPanel;
|
||||
dgPanel.InvalidateRow(iRow);
|
||||
end;
|
||||
end;
|
||||
|
||||
frmMain.Commands.DoContextMenu(Self, Mouse.CursorPos.x, Mouse.CursorPos.y, Background);
|
||||
end;
|
||||
|
||||
procedure TColumnsFileView.tmClearGridTimer(Sender: TObject);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue