From 3ab33c3251f1c1c924fd0674738505a39ae329e7 Mon Sep 17 00:00:00 2001 From: vincents Date: Wed, 5 Oct 2011 13:04:25 +0000 Subject: [PATCH] ideintf: fixed enabled state of down button after deleting the one but last collection item, the listbox has already updated, so its count is ok, but the underlying collection is stil deleting, so its count is 1 too high git-svn-id: trunk@32704 - --- ideintf/collectionpropeditform.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ideintf/collectionpropeditform.pas b/ideintf/collectionpropeditform.pas index 5054c8686c..af680cafa7 100644 --- a/ideintf/collectionpropeditform.pas +++ b/ideintf/collectionpropeditform.pas @@ -224,7 +224,7 @@ begin actAdd.Enabled := Collection <> nil; actDel.Enabled := I > -1; actMoveUp.Enabled := I > 0; - actMoveDown.Enabled := (I >= 0) and (I < Collection.Count - 1); + actMoveDown.Enabled := (I >= 0) and (I < CollectionListBox.Items.Count - 1); end; procedure TCollectionPropertyEditorForm.PersistentAdded(APersistent: TPersistent; Select: boolean);