mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:41:01 +02:00
IDE: Fix TEditorKeymappingOptionsFrame.FilterEditFilterItem, was broken by r52745 #85628cd5f9. Issue #30461.
git-svn-id: trunk@52794 -
This commit is contained in:
parent
a625ed6a3f
commit
e06fda9bf2
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user