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