Răsfoiți Sursa

Bug fix: Alt+Enter keyboard shortcut executed/opened selected file, instead of opening Properties dialog

Source commit: 171e2a5b04a4d8cf4fb0aa151a6f9f927161a673
Martin Prikryl 7 ani în urmă
părinte
comite
75b82720fe
1 a modificat fișierele cu 5 adăugiri și 2 ștergeri
  1. 5 2
      source/packages/filemng/CustomDirView.pas

+ 5 - 2
source/packages/filemng/CustomDirView.pas

@@ -1421,6 +1421,8 @@ begin
 end;
 
 procedure TCustomDirView.KeyDown(var Key: Word; Shift: TShiftState);
+var
+  AKey: Word;
 begin
   if Valid and (not IsEditing) and (not Loading) then
   begin
@@ -1429,10 +1431,11 @@ begin
     begin
       if Assigned(ItemFocused) then
       begin
+         AKey := Key;
          Key := 0;
-         if (Key = VK_RETURN) and (Shift = [ssAlt]) then DoDisplayPropertiesMenu
+         if (AKey = VK_RETURN) and (Shift = [ssAlt]) then DoDisplayPropertiesMenu
            else
-         if (Key <> VK_RETURN) or (Shift = []) then DoExecute(ItemFocused);
+         if (AKey <> VK_RETURN) or (Shift = []) then DoExecute(ItemFocused);
       end;
     end
       else