mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 21:00:23 +02:00
ide: don't eat up and down keys when current object inspector editor is dropped down (issue #0011031)
git-svn-id: trunk@14708 -
This commit is contained in:
parent
eb654610cb
commit
54763caf2c
@ -1903,6 +1903,13 @@ end;
|
||||
|
||||
procedure TOICustomPropertyGrid.HandleStandardKeys(var Key: Word;
|
||||
Shift: TShiftState);
|
||||
|
||||
function IsCurrentEditDroppedDown: Boolean;
|
||||
begin
|
||||
Result := (FCurrentEdit is TCustomCombobox) and
|
||||
TCustomCombobox(FCurrentEdit).DroppedDown;
|
||||
end;
|
||||
|
||||
var
|
||||
Handled: Boolean;
|
||||
begin
|
||||
@ -1911,12 +1918,19 @@ begin
|
||||
begin
|
||||
Handled:=true;
|
||||
case Key of
|
||||
|
||||
VK_UP:
|
||||
if (ItemIndex>0) then SetItemIndexAndFocus(ItemIndex-1);
|
||||
if IsCurrentEditDroppedDown then
|
||||
Handled := False
|
||||
else
|
||||
if (ItemIndex > 0) then
|
||||
SetItemIndexAndFocus(ItemIndex - 1);
|
||||
|
||||
VK_DOWN:
|
||||
if (ItemIndex<FRows.Count-1) then SetItemIndexAndFocus(ItemIndex+1);
|
||||
if IsCurrentEditDroppedDown then
|
||||
Handled := False
|
||||
else
|
||||
if (ItemIndex < FRows.Count - 1) then
|
||||
SetItemIndexAndFocus(ItemIndex + 1);
|
||||
|
||||
VK_TAB:
|
||||
DoTabKey;
|
||||
|
Loading…
Reference in New Issue
Block a user