mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-21 11:39:55 +02:00
IDE: show already grabbed shortcut key in the filter GUI.
git-svn-id: trunk@42238 -
This commit is contained in:
parent
74327375f3
commit
d5bc11ca07
@ -245,14 +245,23 @@ end;
|
||||
|
||||
procedure TEditorKeymappingOptionsFrame.FindKeyButtonClick(Sender: TObject);
|
||||
var
|
||||
KeyFilter: TIDEShortCut;
|
||||
ShortCutDialog: TShortCutDialog;
|
||||
begin
|
||||
if ShowKeyMappingGrabForm(KeyFilter) = mrOK then begin
|
||||
KeyMapKeyFilter := KeyFilter;
|
||||
ShortCutDialog := TShortCutDialog.Create(nil);
|
||||
try
|
||||
ShortCutDialog.ShowSecondary:=False;
|
||||
ShortCutDialog.ShowSequence:=False;
|
||||
ShortCutDialog.Caption:=lisChooseAKey;
|
||||
ShortCutDialog.PrimaryShortCut := KeyMapKeyFilter;
|
||||
if ShortCutDialog.ShowModal = mrOK then begin
|
||||
KeyMapKeyFilter := ShortCutDialog.PrimaryShortCut;
|
||||
UpdateKeyFilterButton;
|
||||
FilterEdit.Filter:=''; // Allow only one of the filters to be active.
|
||||
FilterEdit.InvalidateFilter;
|
||||
end;
|
||||
finally
|
||||
ShortCutDialog.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorKeymappingOptionsFrame.OnIdle(Sender: TObject;
|
||||
|
@ -84,7 +84,6 @@ type
|
||||
|
||||
function ShowKeyMappingEditForm(Index: integer;
|
||||
AKeyCommandRelationList: TKeyCommandRelationList): TModalResult;
|
||||
function ShowKeyMappingGrabForm(out Key: TIDEShortCut; AllowSequence: boolean = false): TModalResult;
|
||||
|
||||
implementation
|
||||
|
||||
@ -106,22 +105,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function ShowKeyMappingGrabForm(out Key: TIDEShortCut; AllowSequence: boolean): TModalResult;
|
||||
var
|
||||
ShortCutDialog: TShortCutDialog;
|
||||
begin
|
||||
ShortCutDialog:=TShortCutDialog.Create(nil);
|
||||
try
|
||||
ShortCutDialog.ShowSecondary:=false;
|
||||
ShortCutDialog.ShowSequence:=AllowSequence;
|
||||
ShortCutDialog.Caption:=lisChooseAKey;
|
||||
Result:=ShortCutDialog.ShowModal;
|
||||
Key:=ShortCutDialog.PrimaryShortCut;
|
||||
finally
|
||||
ShortCutDialog.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{ TShortCutDialog }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user