mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 01:48:00 +02:00
Show proper dialog title for Add Watch and Edit Watch
This commit is contained in:
parent
b73bf4a811
commit
fd64cb8c5a
@ -3102,13 +3102,17 @@ end;
|
||||
procedure TWatchesListBox.EditCurrent;
|
||||
var
|
||||
P: PWatch;
|
||||
D: PWatchItemDialog;
|
||||
begin
|
||||
if Range=0 then Exit;
|
||||
if Focused<WatchesCollection^.Count then
|
||||
P:=WatchesCollection^.At(Focused)
|
||||
else
|
||||
P:=New(PWatch,Init(''));
|
||||
Application^.ExecuteDialog(New(PWatchItemDialog,Init(P)),nil);
|
||||
begin EditNew; exit; end;
|
||||
D:=New(PWatchItemDialog,Init(P));
|
||||
Dispose(D^.Title);
|
||||
D^.Title:=NewStr('Edit Watch');
|
||||
Application^.ExecuteDialog(D,nil);
|
||||
WatchesCollection^.Update;
|
||||
end;
|
||||
|
||||
@ -3410,7 +3414,7 @@ constructor TWatchItemDialog.Init(AWatch: PWatch);
|
||||
var R,R2: TRect;
|
||||
begin
|
||||
R.Assign(0,0,50,10);
|
||||
inherited Init(R,'Edit Watch');
|
||||
inherited Init(R,'Add Watch');
|
||||
Watch:=AWatch;
|
||||
|
||||
GetExtent(R); R.Grow(-3,-2);
|
||||
|
Loading…
Reference in New Issue
Block a user