浏览代码

Bug 1618: Hangs when clicking directory tree while inline editing file name

https://winscp.net/tracker/1618

Source commit: 8c357e194e5b328a52b1aea49cab91e9310f1370
Martin Prikryl 7 年之前
父节点
当前提交
cdcd01b4b4
共有 1 个文件被更改,包括 22 次插入7 次删除
  1. 22 7
      source/packages/filemng/CustomDriveView.pas

+ 22 - 7
source/packages/filemng/CustomDriveView.pas

@@ -87,6 +87,7 @@ type
     procedure WMLButtonDown(var Msg: TWMLButtonDown); message WM_LBUTTONDOWN;
     procedure WMLButtonUp(var Msg: TWMLButtonDown); message WM_LBUTTONUP;
     procedure WMRButtonDown(var Msg: TWMRButtonDown); message WM_RBUTTONDOWN;
+    procedure WMLButtonDblClk(var Message: TWMLButtonDblClk); message WM_LBUTTONDBLCLK;
     procedure WMContextMenu(var Msg: TWMContextMenu); message WM_CONTEXTMENU;
     procedure WMKeyDown(var Message: TWMKeyDown); message WM_KEYDOWN;
     procedure CMDPIChanged(var Message: TMessage); message CM_DPICHANGED;
@@ -864,9 +865,12 @@ end;
 
 procedure TCustomDriveView.WMLButtonDown(var Msg: TWMLButtonDown);
 begin
-  FCanChange := False;
-  GetCursorPos(FStartPos);
-  inherited;
+  if not IsBusy then
+  begin
+    FCanChange := False;
+    GetCursorPos(FStartPos);
+    inherited;
+  end;
 end; {WMLButtonDown}
 
 procedure TCustomDriveView.WMLButtonUp(var Msg: TWMLButtonDown);
@@ -880,12 +884,23 @@ end; {WMLButtonUp}
 
 procedure TCustomDriveView.WMRButtonDown(var Msg: TWMRButtonDown);
 begin
-  GetCursorPos(FStartPos);
-  if FDragDropFilesEx.DragDetectStatus <> ddsDrag then
-    FContextMenu := True;
-  inherited;
+  if not IsBusy then
+  begin
+    GetCursorPos(FStartPos);
+    if FDragDropFilesEx.DragDetectStatus <> ddsDrag then
+      FContextMenu := True;
+    inherited;
+  end;
 end; {WMRButtonDown}
 
+procedure TCustomDriveView.WMLButtonDblClk(var Message: TWMLButtonDblClk);
+begin
+  if not IsBusy then
+  begin
+    inherited;
+  end;
+end;
+
 procedure TCustomDriveView.WMContextMenu(var Msg: TWMContextMenu);
 var
   Node: TTreeNode;