IDE: Fix TEditorKeymappingOptionsFrame.FilterEditFilterItem, was broken by r52745 #85628cd5f9. Issue #30461.

git-svn-id: trunk@52794 -
This commit is contained in:
juha 2016-08-11 11:25:43 +00:00
parent a625ed6a3f
commit e06fda9bf2

View File

@ -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;