mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:19:37 +02:00
IDE: Show icons in the tree of key mapping options. Issue #35923. Patch from FTurtle.
git-svn-id: trunk@61855 -
This commit is contained in:
parent
83e546aa9f
commit
b6ea318732
@ -432,6 +432,18 @@ begin
|
||||
Result := TEditorOptions;
|
||||
end;
|
||||
|
||||
function GetIDECommandImageIndex(AKeyRelation: TKeyCommandRelation): Integer;
|
||||
var
|
||||
IDECommand: TIDECommand;
|
||||
begin
|
||||
IDECommand:=IDECommandList.FindIDECommand(AKeyRelation.Command);
|
||||
if IDECommand.UserCount=0 then
|
||||
Exit(imgKeyItem);
|
||||
Result:=IDECommand.Users[0].ImageIndex;
|
||||
if Result=-1 then
|
||||
Result:=imgKeyItem;
|
||||
end;
|
||||
|
||||
procedure TEditorKeymappingOptionsFrame.FillKeyMappingTreeView;
|
||||
var
|
||||
i, j: Integer;
|
||||
@ -472,7 +484,7 @@ begin
|
||||
end
|
||||
else
|
||||
NewKeyNode := Items.AddChildObject(NewCategoryNode,ItemCaption, CurKeyRelation);
|
||||
NewKeyNode.ImageIndex := imgKeyItem;
|
||||
NewKeyNode.ImageIndex := GetIDECommandImageIndex(CurKeyRelation);
|
||||
NewKeyNode.SelectedIndex := NewKeyNode.ImageIndex;
|
||||
inc(ChildNodeIndex);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user