IDEIntf: Disable INS and DEL keyboard shortcuts in collection property editor if "+" and "-" buttons are hidden.

git-svn-id: trunk@59123 -
This commit is contained in:
wp 2018-09-21 23:05:00 +00:00
parent 63273b9684
commit 18b444b2a3
2 changed files with 6 additions and 6 deletions

View File

@ -234,8 +234,8 @@ var
I: Integer;
begin
I := CollectionListBox.ItemIndex;
actAdd.Enabled := Collection <> nil;
actDel.Enabled := I > -1;
actAdd.Enabled := (Collection <> nil) and actAdd.Visible;
actDel.Enabled := (I > -1) and actDel.Visible;
actMoveUp.Enabled := I > 0;
actMoveDown.Enabled := (I >= 0) and (I < CollectionListBox.Items.Count - 1);
end;

View File

@ -4497,8 +4497,8 @@ begin
if CollectionForm = nil then
CollectionForm := TCollectionPropertyEditorForm.Create(Application);
CollectionForm.SetCollection(ACollection, OwnerPersistent, PropName);
CollectionForm.AddButton.Show;
CollectionForm.Deletebutton.Show;
CollectionForm.actAdd.Visible := true;
CollectionForm.actDel.Visible := true;
CollectionForm.AddButton.Left := 0;
CollectionForm.DeleteButton.Left := 1;
CollectionForm.DividerToolButton.Show;
@ -4536,8 +4536,8 @@ begin
if CollectionForm = nil then
CollectionForm := TCollectionPropertyEditorForm.Create(Application);
CollectionForm.SetCollection(ACollection, OwnerPersistent, PropName);
CollectionForm.AddButton.Hide;
CollectionForm.Deletebutton.Hide;
CollectionForm.actAdd.Visible := false;
CollectionForm.actDel.Visible := false;
CollectionForm.DividerToolButton.Hide;
SetPopupModeParentForPropertyEditor(CollectionForm);
CollectionForm.EnsureVisible;