From 5093f81168d9375b6319eb17c77cf698dd5f9a24 Mon Sep 17 00:00:00 2001 From: juha Date: Mon, 12 Oct 2015 08:32:57 +0000 Subject: [PATCH] IDE: Keep the selection of key in KeyMapping window. From Ondrej Pokorny. git-svn-id: trunk@50035 - --- ide/frames/editor_keymapping_options.lfm | 1 + ide/frames/editor_keymapping_options.pas | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/ide/frames/editor_keymapping_options.lfm b/ide/frames/editor_keymapping_options.lfm index a9dca4cd48..ab0daaf612 100644 --- a/ide/frames/editor_keymapping_options.lfm +++ b/ide/frames/editor_keymapping_options.lfm @@ -17,6 +17,7 @@ object EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame Height = 23 Top = 6 Width = 305 + OnAfterFilter = FilterEditAfterFilter OnFilterItem = FilterEditFilterItem ButtonWidth = 23 NumGlyphs = 1 diff --git a/ide/frames/editor_keymapping_options.pas b/ide/frames/editor_keymapping_options.pas index 7922bcd42e..822073ec39 100644 --- a/ide/frames/editor_keymapping_options.pas +++ b/ide/frames/editor_keymapping_options.pas @@ -59,6 +59,7 @@ type procedure EditMenuItemClick(Sender: TObject); procedure ChooseSchemeButtonClick(Sender: TObject); procedure ClearButtonClick(Sender: TObject); + procedure FilterEditAfterFilter(Sender: TObject); function FilterEditFilterItem(Item: TObject; out Done: Boolean): Boolean; procedure FilterEditKeyPress(Sender: TObject; var {%H-}Key: char); procedure FindKeyButtonClick(Sender: TObject); @@ -473,6 +474,11 @@ begin end; end; +procedure TEditorKeymappingOptionsFrame.FilterEditAfterFilter(Sender: TObject); +begin + TreeView.MakeSelectionVisible; +end; + function TEditorKeymappingOptionsFrame.KeyMappingRelationToCaption(Index: Integer): String; begin Result := KeyMappingRelationToCaption(FEditingKeyMap.Relations[Index]);