mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 08:58:23 +02:00
IDE, Debugger: prevent empty watches from being added.
git-svn-id: trunk@63650 -
This commit is contained in:
parent
b208794e24
commit
5e1702e798
@ -378,6 +378,8 @@ var
|
||||
Watch: TCurrentWatch;
|
||||
begin
|
||||
S := cmbExpression.Text;
|
||||
if s = '' then
|
||||
exit;
|
||||
if DebugBoss.Watches.CurrentWatches.Find(S) = nil
|
||||
then begin
|
||||
DebugBoss.Watches.CurrentWatches.BeginUpdate;
|
||||
|
@ -309,6 +309,8 @@ var
|
||||
Watch: TCurrentWatch;
|
||||
begin
|
||||
S := lvLocals.Selected.Caption;
|
||||
if s = '' then
|
||||
exit;
|
||||
if DebugBoss.Watches.CurrentWatches.Find(S) = nil then
|
||||
begin
|
||||
DebugBoss.Watches.CurrentWatches.BeginUpdate;
|
||||
|
@ -11,7 +11,7 @@ object WatchPropertyDlg: TWatchPropertyDlg
|
||||
ClientWidth = 428
|
||||
Constraints.MinWidth = 400
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.9.0.0'
|
||||
LCLVersion = '2.1.0.0'
|
||||
object rgStyle: TRadioGroup
|
||||
Left = 6
|
||||
Height = 104
|
||||
@ -105,6 +105,7 @@ object WatchPropertyDlg: TWatchPropertyDlg
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
OnChange = txtExpressionChange
|
||||
TabOrder = 0
|
||||
end
|
||||
object lblRepCount: TLabel
|
||||
|
@ -61,6 +61,7 @@ type
|
||||
txtRepCount: TEdit;
|
||||
procedure btnHelpClick(Sender: TObject);
|
||||
procedure btnOKClick(Sender: TObject);
|
||||
procedure txtExpressionChange(Sender: TObject);
|
||||
private
|
||||
FWatch: TIdeWatch;
|
||||
public
|
||||
@ -82,6 +83,8 @@ const
|
||||
wdfStructure, wdfDefault, wdfMemDump, wdfBinary
|
||||
);
|
||||
begin
|
||||
if txtExpression.Text = '' then
|
||||
exit;
|
||||
DebugBoss.Watches.CurrentWatches.BeginUpdate;
|
||||
try
|
||||
if FWatch = nil
|
||||
@ -108,6 +111,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWatchPropertyDlg.txtExpressionChange(Sender: TObject);
|
||||
begin
|
||||
ButtonPanel.OKButton.Enabled := txtExpression.Text <> '';
|
||||
end;
|
||||
|
||||
procedure TWatchPropertyDlg.btnHelpClick(Sender: TObject);
|
||||
begin
|
||||
LazarusHelp.ShowHelpForIDEControl(Self);
|
||||
@ -142,6 +150,7 @@ begin
|
||||
chkUseInstanceClass.Checked := defClassAutoCast in FWatch.EvaluateFlags;
|
||||
txtRepCount.Text := IntToStr(FWatch.RepeatCount);
|
||||
end;
|
||||
txtExpressionChange(nil);
|
||||
|
||||
lblDigits.Enabled := False;
|
||||
txtDigits.Enabled := False;
|
||||
|
Loading…
Reference in New Issue
Block a user