Commit 2368d8ad authored by Juha Manninen's avatar Juha Manninen
Browse files

IdeIntf: Prevent invalid shortcut entries in TCustomShortCutGrabBox. Issue...

IdeIntf: Prevent invalid shortcut entries in TCustomShortCutGrabBox. Issue #27705, patch from Howard Page-Clark.

git-svn-id: trunk@48506 -
parent ed8a304f
......@@ -1509,6 +1509,7 @@ type
FShiftState: TShiftState;
FCheckBoxes: array[TShiftStateEnum] of TCheckBox;
FGrabForm: TForm;
function GetKey: Word;
function GetShiftCheckBox(Shift: TShiftStateEnum): TCheckBox;
procedure SetAllowedShifts(const AValue: TShiftState);
procedure SetKey(const AValue: Word);
......@@ -1528,7 +1529,7 @@ type
constructor Create(TheOwner: TComponent); override;
function GetDefaultShiftButtons: TShiftState;
property ShiftState: TShiftState read FShiftState write SetShiftState;
property Key: Word read FKey write SetKey;
property Key: Word read GetKey write SetKey;
property ShiftButtons: TShiftState read FShiftButtons write SetShiftButtons;
property AllowedShifts: TShiftState read FAllowedShifts write SetAllowedShifts;
property KeyComboBox: TComboBox read FKeyComboBox;
......@@ -6715,6 +6716,13 @@ begin
Result:=FCheckBoxes[Shift];
end;
function TCustomShortCutGrabBox.GetKey: Word;
begin
Result:=FKey;
if (FKey = 0) then
FShiftState:=[];
end;
procedure TCustomShortCutGrabBox.SetAllowedShifts(const AValue: TShiftState);
begin
if FAllowedShifts=AValue then exit;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment