Skip to content

Commit

Permalink
ACA & DTMEditor: Confirm when clearing points/colors
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Aug 30, 2023
1 parent b2dcd48 commit 68d0ab4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
9 changes: 6 additions & 3 deletions Source/forms/simba.aca.pas
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ implementation

uses
Clipbrd, TypInfo, LCLType,
simba.windowhandle, simba.bitmap, simba.colormath_aca, simba.singlematrix;
simba.windowhandle, simba.bitmap, simba.colormath_aca, simba.singlematrix, simba.dialog;

procedure TSimbaACAForm.ClientImageMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
Expand Down Expand Up @@ -392,8 +392,11 @@ procedure TSimbaACAForm.ButtonRemoveColorClick(Sender: TObject);

procedure TSimbaACAForm.ButtonRemoveAllColorsClick(Sender: TObject);
begin
ColorListBox.Clear();
ColorListBox.OnSelectionChange(Sender, False);
if (SimbaQuestionDlg('ACA', 'Clear All Colors?') = ESimbaDialogResult.YES) then
begin
ColorListBox.Clear();
ColorListBox.OnSelectionChange(Sender, False);
end;
end;

procedure TSimbaACAForm.ButtonLoadImageClick(Sender: TObject);
Expand Down
10 changes: 6 additions & 4 deletions Source/forms/simba.dtmeditor.pas
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ implementation
{$R *.lfm}

uses
math,
simba.windowhandle, simba.colormath;
simba.windowhandle, simba.colormath, simba.dialog;

procedure TSimbaDTMEditorForm.ClientImageMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
Expand Down Expand Up @@ -519,8 +518,11 @@ procedure TSimbaDTMEditorForm.ButtonClearImageClick(Sender: TObject);

procedure TSimbaDTMEditorForm.ButtonDeletePointsClick(Sender: TObject);
begin
ListBox.Clear();
ListBox.OnSelectionChange(Self, False);
if (SimbaQuestionDlg('DTMEditor', 'Clear All Points?') = ESimbaDialogResult.YES) then
begin
ListBox.Clear();
ListBox.OnSelectionChange(Self, False);
end;
end;

procedure TSimbaDTMEditorForm.PointEditChanged(Sender: TObject);
Expand Down
1 change: 1 addition & 0 deletions Source/simba.image_lazbridge.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
}
unit simba.image_lazbridge;

{$DEFINE SIMBA_MAX_OPTIMIZATION}
{$i simba.inc}

interface
Expand Down

0 comments on commit 68d0ab4

Please sign in to comment.