diff --git a/ide/buildprofilemanager.lfm b/ide/buildprofilemanager.lfm index 9c00773908..d6de7b33ee 100644 --- a/ide/buildprofilemanager.lfm +++ b/ide/buildprofilemanager.lfm @@ -41,21 +41,21 @@ object BuildProfileManagerForm: TBuildProfileManagerForm OnClick = MoveDownButtonClick end object MoveUpButton: TToolButton - Left = 246 + Left = 201 Top = 0 Caption = 'MoveUpButton' ImageIndex = 3 OnClick = MoveUpButtonClick end object EditButton: TToolButton - Left = 171 + Left = 139 Top = 0 Caption = 'EditButton' ImageIndex = 2 OnClick = EditButtonClick end object RemoveButton: TToolButton - Left = 73 + Left = 60 Top = 0 Caption = 'RemoveButton' ImageIndex = 1 @@ -69,7 +69,7 @@ object BuildProfileManagerForm: TBuildProfileManagerForm OnClick = AddButtonClick end object tbSeparator: TToolButton - Left = 242 + Left = 197 Top = 0 Width = 4 Caption = 'tbSeparator' @@ -78,7 +78,7 @@ object BuildProfileManagerForm: TBuildProfileManagerForm end object ProfilesListBox: TListBox Left = 1 - Height = 321 + Height = 327 Top = 93 Width = 358 Align = alClient @@ -88,8 +88,8 @@ object BuildProfileManagerForm: TBuildProfileManagerForm end object ButtonPanel: TButtonPanel Left = 7 - Height = 32 - Top = 420 + Height = 26 + Top = 426 Width = 346 OKButton.Name = 'OKButton' OKButton.Caption = '&ОК' diff --git a/ide/buildprofilemanager.pas b/ide/buildprofilemanager.pas index f534e15d4e..39b9b47a60 100644 --- a/ide/buildprofilemanager.pas +++ b/ide/buildprofilemanager.pas @@ -888,20 +888,25 @@ begin i := ProfilesListbox.ItemIndex; if i<0 then exit; // Remove the item from selected list. - SelI:=fProfsToManage.Selected.IndexOf(fProfsToManage[i].fName); - if SelI>-1 then - fProfsToManage.Selected.Delete(SelI); - // New last item index. - NewI:=i; - if i=ProfilesListbox.Items.Count-1 then - Dec(NewI); - // Update ProfsToManage collection. - fProfsToManage.Delete(i); - fProfsToManage.fCurrentIndex:=NewI; - // Update ListBox - ProfilesListBox.Items.Delete(i); - ProfilesListBox.ItemIndex:=NewI; - EnableButtons; + if MessageDlg(lisLazBuildConfirmDeletion, + lisLazBuildAreYouSureYouWantToDeleteThisBuildProfile, mtConfirmation, + [mbYes, mbNo], 0)=mrYes then + begin + SelI:=fProfsToManage.Selected.IndexOf(fProfsToManage[i].fName); + if SelI>-1 then + fProfsToManage.Selected.Delete(SelI); + // New last item index. + NewI:=i; + if i=ProfilesListbox.Items.Count-1 then + Dec(NewI); + // Update ProfsToManage collection. + fProfsToManage.Delete(i); + fProfsToManage.fCurrentIndex:=NewI; + // Update ListBox + ProfilesListBox.Items.Delete(i); + ProfilesListBox.ItemIndex:=NewI; + EnableButtons; + end; end; procedure TBuildProfileManagerForm.EditButtonClick(Sender: TObject); diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index f10f2384f0..d8e8c0da4e 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -2838,6 +2838,9 @@ resourcestring +'ation dialog when building directly from Tools menu'; lisLazBuildEditListOfDefinesWhichCanBeUsedByAnyProfile = 'Edit list of ' +'defines which can be used by any profile'; + lisLazBuildConfirmDeletion = 'Confirm deletion'; + lisLazBuildAreYouSureYouWantToDeleteThisBuildProfile = 'Are you sure you ' + +'want to delete this build profile?'; // compiler lisCompilerErrorInvalidCompiler = 'Error: invalid compiler: %s';