mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 12:59:19 +02:00
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:
parent
d49e88d6cb
commit
beb8330a6a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user