Merged revision(s) 48506 #2368d8ad9a from trunk:

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

git-svn-id: branches/fixes_1_4@48599 -
This commit is contained in:
maxim 2015-04-02 22:06:59 +00:00
parent d49e88d6cb
commit beb8330a6a

View File

@ -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;
@ -6714,6 +6715,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;