mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 23:22:08 +02:00
ide: don't eat any keys when object inspector editor is dropped down (issue #0011031)
git-svn-id: trunk@14723 -
This commit is contained in:
parent
d2b0a4c27d
commit
ab35d6d7d9
@ -1916,49 +1916,44 @@ begin
|
|||||||
//writeln('TOICustomPropertyGrid.HandleStandardKeys ',Key);
|
//writeln('TOICustomPropertyGrid.HandleStandardKeys ',Key);
|
||||||
if Shift = [] then
|
if Shift = [] then
|
||||||
begin
|
begin
|
||||||
Handled:=true;
|
Handled := not IsCurrentEditDroppedDown;
|
||||||
case Key of
|
if Handled then
|
||||||
VK_UP:
|
case Key of
|
||||||
if IsCurrentEditDroppedDown then
|
VK_UP:
|
||||||
Handled := False
|
if (ItemIndex > 0) then
|
||||||
|
SetItemIndexAndFocus(ItemIndex - 1);
|
||||||
|
|
||||||
|
VK_DOWN:
|
||||||
|
if (ItemIndex < FRows.Count - 1) then
|
||||||
|
SetItemIndexAndFocus(ItemIndex + 1);
|
||||||
|
|
||||||
|
VK_TAB:
|
||||||
|
DoTabKey;
|
||||||
|
|
||||||
|
VK_LEFT:
|
||||||
|
if ((FCurrentEdit = nil) or not FCurrentEdit.Focused)
|
||||||
|
and (ItemIndex>=0) and (Rows[ItemIndex].Expanded) then
|
||||||
|
ShrinkRow(ItemIndex)
|
||||||
|
else
|
||||||
|
Handled:=false;
|
||||||
|
|
||||||
|
VK_RIGHT:
|
||||||
|
if ((FCurrentEdit = nil) or not FCurrentEdit.Focused)
|
||||||
|
and (ItemIndex >= 0) and (not Rows[ItemIndex].Expanded)
|
||||||
|
and (paSubProperties in Rows[ItemIndex].Editor.GetAttributes) then
|
||||||
|
ExpandRow(ItemIndex)
|
||||||
|
else
|
||||||
|
Handled:=false;
|
||||||
|
|
||||||
|
VK_RETURN:
|
||||||
|
begin
|
||||||
|
SetRowValue;
|
||||||
|
if (FCurrentEdit is TCustomEdit) then
|
||||||
|
TCustomEdit(FCurrentEdit).SelectAll;
|
||||||
|
end;
|
||||||
else
|
else
|
||||||
if (ItemIndex > 0) then
|
Handled := false;
|
||||||
SetItemIndexAndFocus(ItemIndex - 1);
|
end;
|
||||||
|
|
||||||
VK_DOWN:
|
|
||||||
if IsCurrentEditDroppedDown then
|
|
||||||
Handled := False
|
|
||||||
else
|
|
||||||
if (ItemIndex < FRows.Count - 1) then
|
|
||||||
SetItemIndexAndFocus(ItemIndex + 1);
|
|
||||||
|
|
||||||
VK_TAB:
|
|
||||||
DoTabKey;
|
|
||||||
|
|
||||||
VK_LEFT:
|
|
||||||
if ((FCurrentEdit = nil) or not FCurrentEdit.Focused)
|
|
||||||
and (ItemIndex>=0) and (Rows[ItemIndex].Expanded) then
|
|
||||||
ShrinkRow(ItemIndex)
|
|
||||||
else
|
|
||||||
Handled:=false;
|
|
||||||
|
|
||||||
VK_RIGHT:
|
|
||||||
if ((FCurrentEdit = nil) or not FCurrentEdit.Focused)
|
|
||||||
and (ItemIndex >= 0) and (not Rows[ItemIndex].Expanded)
|
|
||||||
and (paSubProperties in Rows[ItemIndex].Editor.GetAttributes) then
|
|
||||||
ExpandRow(ItemIndex)
|
|
||||||
else
|
|
||||||
Handled:=false;
|
|
||||||
|
|
||||||
VK_RETURN:
|
|
||||||
begin
|
|
||||||
SetRowValue;
|
|
||||||
if (FCurrentEdit is TCustomEdit) then
|
|
||||||
TCustomEdit(FCurrentEdit).SelectAll;
|
|
||||||
end;
|
|
||||||
else
|
|
||||||
Handled := false;
|
|
||||||
end;
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if Shift = [ssCtrl] then
|
if Shift = [ssCtrl] then
|
||||||
|
Loading…
Reference in New Issue
Block a user