Browse Source

Merge branch 'master' into dev

Source commit: 9250a2e374877e8dd7fe2271ef61bae698a8302f
Martin Prikryl 5 years ago
parent
commit
f3bca2f66b
1 changed files with 14 additions and 0 deletions
  1. 14 0
      source/forms/NonVisual.cpp

+ 14 - 0
source/forms/NonVisual.cpp

@@ -905,6 +905,20 @@ void __fastcall TNonVisualDataModule::CommanderShortcuts()
 
   CloseApplicationAction->ShortCut = ShortCut(VK_F10, NONE);
 
+  TShortCut CtrlF4 = ShortCut(VK_F4, CTRL);
+  LocalSortByExtAction->ShortCut = ExplorerKeyboardShortcuts ? TShortCut(0) : CtrlF4;
+  RemoteSortByExtAction->ShortCut = LocalSortByExtAction->ShortCut;
+  CurrentSortByExtAction->ShortCut = LocalSortByExtAction->ShortCut;
+  int Index = CloseSessionAction2->SecondaryShortCuts->IndexOfShortCut(CtrlF4);
+  if (ExplorerKeyboardShortcuts && (Index < 0))
+  {
+    CloseSessionAction2->SecondaryShortCuts->Add(ShortCutToText(CtrlF4));
+  }
+  else if (!ExplorerKeyboardShortcuts && (Index >= 0))
+  {
+    CloseSessionAction2->SecondaryShortCuts->Delete(Index);
+  }
+
   CloneShortcuts();
 }
 #undef CTRL