From e06fda9bf24faec3b086a136cf668f31e2482cb2 Mon Sep 17 00:00:00 2001 From: juha Date: Thu, 11 Aug 2016 11:25:43 +0000 Subject: [PATCH] IDE: Fix TEditorKeymappingOptionsFrame.FilterEditFilterItem, was broken by r52745 #85628cd5f9. Issue #30461. git-svn-id: trunk@52794 - --- ide/frames/editor_keymapping_options.pas | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ide/frames/editor_keymapping_options.pas b/ide/frames/editor_keymapping_options.pas index 45b1e75989..d5f87ff0f0 100644 --- a/ide/frames/editor_keymapping_options.pas +++ b/ide/frames/editor_keymapping_options.pas @@ -229,16 +229,16 @@ var begin Done:=True; Result:=False; - if ItemData=nil then Exit; - Assert(TObject(ItemData) is TKeyCommandRelation, - 'TEditorKeymappingOptionsFrame.FilterEditFilterItem: ItemData is not TKeyCommandRelation.'); - KeyRel:=TKeyCommandRelation(ItemData); // Tree item is actual key command. - Done:=False; - Result:=KeyMapKeyFilter.Key1<>VK_UNKNOWN; - if Result then begin // Key filter is defined. - Done:=True; - Result:=(CompareIDEShortCutKey1s(@KeyMapKeyFilter,@KeyRel.ShortcutA)=0) - or (CompareIDEShortCutKey1s(@KeyMapKeyFilter,@KeyRel.ShortcutB)=0); + if TObject(ItemData) is TKeyCommandRelation then + begin + KeyRel:=TKeyCommandRelation(ItemData); // Tree item is actual key command. + Done:=False; + Result:=KeyMapKeyFilter.Key1<>VK_UNKNOWN; + if Result then begin // Key filter is defined. + Done:=True; + Result:=(CompareIDEShortCutKey1s(@KeyMapKeyFilter,@KeyRel.ShortcutA)=0) + or (CompareIDEShortCutKey1s(@KeyMapKeyFilter,@KeyRel.ShortcutB)=0); + end; end; end;