浏览代码

Not showing remote custom commands and local custom commands working with remote files in local file context menu

Source commit: 8c8cbadca2d37b6aa91f3668ab19c6030b3446d9
Martin Prikryl 6 年之前
父节点
当前提交
9b6d2cad58
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      source/forms/CustomScpExplorer.cpp

+ 4 - 3
source/forms/CustomScpExplorer.cpp

@@ -1793,9 +1793,9 @@ int __fastcall TCustomScpExplorerForm::CustomCommandState(
     }
     else
     {
-      if ((ListType == ccltAll) || (ListType == ccltFile))
+      if ((ListType == ccltAll) || ((ListType == ccltFile) && !IsSideLocalBrowser(FCurrentSide)))
       {
-        Result = (!IsSideLocalBrowser(FCurrentSide) && DirView(FCurrentSide)->AnyFileSelected(OnFocused, false, true)) ? AllowedState : 0;
+        Result = (DirView(FCurrentSide)->AnyFileSelected(OnFocused, false, true)) ? AllowedState : 0;
       }
       else
       {
@@ -1836,7 +1836,8 @@ int __fastcall TCustomScpExplorerForm::CustomCommandState(
     }
     else
     {
-      if ((ListType == ccltAll) || (ListType == ccltFile))
+      if ((ListType == ccltAll) ||
+          ((ListType == ccltFile) && (!IsSideLocalBrowser(FCurrentSide) || FLAGCLEAR(Command.Params, ccRemoteFiles))))
       {
         Result = DirView(FCurrentSide)->AnyFileSelected(OnFocused, false, true) ? 1 : 0;
       }