Pārlūkot izejas kodu

Merge r46338,r46340 from trunk

  Revision: 46338
  Author: hajny
  Date: 2020-08-09 14:31:36
  Message:
  * fix bug causing misinterpretation of cursor keys in case of tab without shurtcuts

  Revision: 46340
  Author: hajny
  Date: 2020-08-09 15:25:37
  Message:
  + added possibility to navigate among tabs using Ctrl-PgUp/Ctrl-PgDn

git-svn-id: branches/fixes_3_2@46341 -
Tomas Hajny 5 gadi atpakaļ
vecāks
revīzija
d61ea1f11d
1 mainītis faili ar 18 papildinājumiem un 1 dzēšanām
  1. 18 1
      packages/fv/src/tabs.pas

+ 18 - 1
packages/fv/src/tabs.pas

@@ -399,10 +399,27 @@ begin
                    ClearEvent(Event);
                    end;
                  end;
+            kbCtrlPgUp:
+              begin
+               if ActiveDef > 0 then
+                Index := Pred (ActiveDef)
+               else
+                Index := Pred (DefCount);
+               ClearEvent(Event);
+              end;
+            kbCtrlPgDn:
+              begin
+               if ActiveDef < Pred (DefCount) then
+                Index := Succ (ActiveDef)
+               else
+                Index := 0;
+               ClearEvent(Event);
+              end;
        else
        for I:=0 to DefCount-1 do
            begin
-             if Upcase(GetAltChar(Event.KeyCode))=AtTab(I)^.ShortCut
+             if (AtTab(I)^.ShortCut <> #0) and
+                         (Upcase(GetAltChar(Event.KeyCode))=AtTab(I)^.ShortCut)
                 then begin
                        Index:=I;
                        ClearEvent(Event);