Răsfoiți Sursa

The Edit command for the other local panel was enabled even when only folders were selected

Source commit: a470131ef8c9e89b83ea019729622006f05e5494
Martin Prikryl 4 ani în urmă
părinte
comite
0887231c76
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      source/forms/NonVisual.cpp

+ 2 - 1
source/forms/NonVisual.cpp

@@ -149,6 +149,7 @@ void __fastcall TNonVisualDataModule::ExplorerActionsUpdate(
   #define EnabledRemoteFocusedOperation (ScpExplorer->EnableFocusedOperation[osRemote] && HasTerminal)
   #define EnabledRemoteFocusedOperation (ScpExplorer->EnableFocusedOperation[osRemote] && HasTerminal)
   #define EnabledRemoteSelectedFileOperation (ScpExplorer->EnableSelectedFileOperation[osRemote] && HasTerminal)
   #define EnabledRemoteSelectedFileOperation (ScpExplorer->EnableSelectedFileOperation[osRemote] && HasTerminal)
   #define EnabledOtherSelectedOperation ScpExplorer->IsLocalBrowserMode() && ScpExplorer->EnableSelectedOperation[osOther]
   #define EnabledOtherSelectedOperation ScpExplorer->IsLocalBrowserMode() && ScpExplorer->EnableSelectedOperation[osOther]
+  #define EnabledOtherSelectedFileOperation ScpExplorer->IsLocalBrowserMode() && ScpExplorer->EnableSelectedFileOperation[osOther]
   // focused operation
   // focused operation
   UPD(CurrentDeleteFocusedAction, EnabledFocusedOperation)
   UPD(CurrentDeleteFocusedAction, EnabledFocusedOperation)
   UPD(CurrentPropertiesFocusedAction, EnabledFocusedOperation)
   UPD(CurrentPropertiesFocusedAction, EnabledFocusedOperation)
@@ -228,7 +229,7 @@ void __fastcall TNonVisualDataModule::ExplorerActionsUpdate(
     Action->Visible = !ScpExplorer->IsLocalBrowserMode())
     Action->Visible = !ScpExplorer->IsLocalBrowserMode())
   UPDEX1(RemoteCopyNonQueueAction, EnabledRemoteSelectedOperation, Action->Visible = !ScpExplorer->IsLocalBrowserMode())
   UPDEX1(RemoteCopyNonQueueAction, EnabledRemoteSelectedOperation, Action->Visible = !ScpExplorer->IsLocalBrowserMode())
   UPD(RemoteRenameAction2, (EnabledRemoteSelectedOperation && ScpExplorer->Terminal->IsCapable[fcRename]) || EnabledOtherSelectedOperation)
   UPD(RemoteRenameAction2, (EnabledRemoteSelectedOperation && ScpExplorer->Terminal->IsCapable[fcRename]) || EnabledOtherSelectedOperation)
-  UPD(RemoteEditAction2, (EnabledRemoteSelectedFileOperation || EnabledOtherSelectedOperation) && !WinConfiguration->DisableOpenEdit)
+  UPD(RemoteEditAction2, (EnabledRemoteSelectedFileOperation || EnabledOtherSelectedFileOperation) && !WinConfiguration->DisableOpenEdit)
   UPD(RemoteMoveAction, EnabledRemoteSelectedOperation)
   UPD(RemoteMoveAction, EnabledRemoteSelectedOperation)
   UPD(RemoteCreateDirAction3, DirViewEnabled(osRemote))
   UPD(RemoteCreateDirAction3, DirViewEnabled(osRemote))
   UPD(RemoteNewFileAction, DirViewEnabled(osRemote) && !WinConfiguration->DisableOpenEdit)
   UPD(RemoteNewFileAction, DirViewEnabled(osRemote) && !WinConfiguration->DisableOpenEdit)