View Issue Details

IDProjectCategoryView StatusLast Update
0035923PatchesPatchpublic2019-09-11 17:50
ReporterFTurtleAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version2.1 (SVN)Product Build61652 
Target VersionFixed in Version 
Summary0035923: IDE Options/Key Mappings: showing icons in the tree.
DescriptionSee pictures.
TagsNo tags attached.
Fixed in Revisionr61855
LazTarget-
Widgetset
Attached Files
  • old.png (71,253 bytes)
    old.png (71,253 bytes)
  • new.png (70,298 bytes)
    new.png (70,298 bytes)
  • patch.diff (1,111 bytes)
    Index: ide/frames/editor_keymapping_options.pas
    ===================================================================
    --- ide/frames/editor_keymapping_options.pas	(revision 61652)
    +++ ide/frames/editor_keymapping_options.pas	(working copy)
    @@ -441,6 +441,19 @@
       ChildNodeIndex: Integer;
       CategoryNodeIndex: Integer;
       ItemCaption: String;
    +
    +  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;
    +
     begin
       with TreeView do
       begin
    @@ -472,7 +485,7 @@
             end
             else
               NewKeyNode := Items.AddChildObject(NewCategoryNode,ItemCaption, CurKeyRelation);
    -        NewKeyNode.ImageIndex := imgKeyItem;
    +        NewKeyNode.ImageIndex := GetIDECommandImageIndex(CurKeyRelation);
             NewKeyNode.SelectedIndex := NewKeyNode.ImageIndex;
             inc(ChildNodeIndex);
           end;
    
    patch.diff (1,111 bytes)

Activities

FTurtle

2019-08-02 22:20

reporter  

old.png (71,253 bytes)
old.png (71,253 bytes)
new.png (70,298 bytes)
new.png (70,298 bytes)
patch.diff (1,111 bytes)
Index: ide/frames/editor_keymapping_options.pas
===================================================================
--- ide/frames/editor_keymapping_options.pas	(revision 61652)
+++ ide/frames/editor_keymapping_options.pas	(working copy)
@@ -441,6 +441,19 @@
   ChildNodeIndex: Integer;
   CategoryNodeIndex: Integer;
   ItemCaption: String;
+
+  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;
+
 begin
   with TreeView do
   begin
@@ -472,7 +485,7 @@
         end
         else
           NewKeyNode := Items.AddChildObject(NewCategoryNode,ItemCaption, CurKeyRelation);
-        NewKeyNode.ImageIndex := imgKeyItem;
+        NewKeyNode.ImageIndex := GetIDECommandImageIndex(CurKeyRelation);
         NewKeyNode.SelectedIndex := NewKeyNode.ImageIndex;
         inc(ChildNodeIndex);
       end;
patch.diff (1,111 bytes)

Alexey Tor.

2019-09-09 08:37

reporter   ~0118000

Looks good, thanks.

Juha Manninen

2019-09-10 23:52

developer   ~0118026

Applied, thanks.
Yes, looks good. :)

FTurtle

2019-09-11 17:50

reporter   ~0118037

Thank you.

Issue History

Date Modified Username Field Change
2019-08-02 22:18 FTurtle New Issue
2019-08-02 22:20 FTurtle File Added: old.png
2019-08-02 22:20 FTurtle File Added: new.png
2019-08-02 22:20 FTurtle File Added: patch.diff
2019-09-09 08:37 Alexey Tor. Note Added: 0118000
2019-09-10 23:51 Juha Manninen Assigned To => Juha Manninen
2019-09-10 23:51 Juha Manninen Status new => assigned
2019-09-10 23:52 Juha Manninen Status assigned => resolved
2019-09-10 23:52 Juha Manninen Resolution open => fixed
2019-09-10 23:52 Juha Manninen Fixed in Revision => r61855
2019-09-10 23:52 Juha Manninen LazTarget => -
2019-09-10 23:52 Juha Manninen Note Added: 0118026
2019-09-11 17:50 FTurtle Status resolved => closed
2019-09-11 17:50 FTurtle Note Added: 0118037