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; I: Integer;
begin begin
I := CollectionListBox.ItemIndex; I := CollectionListBox.ItemIndex;
actAdd.Enabled := Collection <> nil; actAdd.Enabled := (Collection <> nil) and actAdd.Visible;
actDel.Enabled := I > -1; actDel.Enabled := (I > -1) and actDel.Visible;
actMoveUp.Enabled := I > 0; actMoveUp.Enabled := I > 0;
actMoveDown.Enabled := (I >= 0) and (I < CollectionListBox.Items.Count - 1); actMoveDown.Enabled := (I >= 0) and (I < CollectionListBox.Items.Count - 1);
end; end;

View File

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