From e06e78b0d4ee30535490fa4cae3d7d5fcae20e9a Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 22 Dec 2009 06:19:48 +0000 Subject: [PATCH] ideintf: fix checklistbox editor by taka_jp (issue #0015368) git-svn-id: trunk@23226 - --- ideintf/checklistboxeditordlg.pas | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ideintf/checklistboxeditordlg.pas b/ideintf/checklistboxeditordlg.pas index 50e5fe8947..b5946cf8e3 100644 --- a/ideintf/checklistboxeditordlg.pas +++ b/ideintf/checklistboxeditordlg.pas @@ -81,15 +81,29 @@ var strItem: string; begin if InputQuery(clbCheckListBoxEditor, clbAdd, strItem) then + begin FCheck.Items.Add(strItem); + Change; + end; end; procedure TCheckListBoxEditorDlg.DeleteItem(Sender:TObject); + var + OldIndex : integer; begin if FCheck.ItemIndex = -1 then exit; if MessageDlg(clbCheckListBoxEditor,Format(clbDeleteQuest,[FCheck.ItemIndex,FCheck.Items[FCheck.ItemIndex]]), mtConfirmation, mbYesNo, 0) = mrYes then + begin + // save old index + OldIndex := FCheck.ItemIndex; FCheck.Items.Delete(FCheck.ItemIndex); + if (FCheck.Count-1