mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 16:39:19 +02:00
DBG: Watches, save "Use instance class" to config
git-svn-id: trunk@37444 -
This commit is contained in:
parent
4ba47f05cb
commit
c319ad6bd8
@ -4783,6 +4783,9 @@ begin
|
|||||||
FThreadId := AConfig.GetValue(APath + 'ThreadId', -1);
|
FThreadId := AConfig.GetValue(APath + 'ThreadId', -1);
|
||||||
FStackFrame := AConfig.GetValue(APath + 'StackFrame', -1);
|
FStackFrame := AConfig.GetValue(APath + 'StackFrame', -1);
|
||||||
FValue := AConfig.GetValue(APath + 'Value', '');
|
FValue := AConfig.GetValue(APath + 'Value', '');
|
||||||
|
if AConfig.GetValue(APath + 'ClassAutoCast', False)
|
||||||
|
then Include(FEvaluateFlags, defClassAutoCast)
|
||||||
|
else Exclude(FEvaluateFlags, defClassAutoCast);
|
||||||
try ReadStr(AConfig.GetValue(APath + 'DisplayFormat', 'wdfDefault'), FDisplayFormat);
|
try ReadStr(AConfig.GetValue(APath + 'DisplayFormat', 'wdfDefault'), FDisplayFormat);
|
||||||
except FDisplayFormat := wdfDefault; end;
|
except FDisplayFormat := wdfDefault; end;
|
||||||
try ReadStr(AConfig.GetValue(APath + 'Validity', 'ddsValid'), FValidity);
|
try ReadStr(AConfig.GetValue(APath + 'Validity', 'ddsValid'), FValidity);
|
||||||
@ -4800,6 +4803,7 @@ begin
|
|||||||
AConfig.SetDeleteValue(APath + 'DisplayFormat', s, 'wdfDefault');
|
AConfig.SetDeleteValue(APath + 'DisplayFormat', s, 'wdfDefault');
|
||||||
WriteStr(s, FValidity);
|
WriteStr(s, FValidity);
|
||||||
AConfig.SetDeleteValue(APath + 'Validity', s, 'ddsValid');
|
AConfig.SetDeleteValue(APath + 'Validity', s, 'ddsValid');
|
||||||
|
AConfig.SetDeleteValue(APath + 'ClassAutoCast', defClassAutoCast in FEvaluateFlags, False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TWatchValue.Create;
|
constructor TWatchValue.Create;
|
||||||
@ -8248,6 +8252,9 @@ procedure TWatch.LoadDataFromXMLConfig(const AConfig: TXMLConfig; const APath: s
|
|||||||
begin
|
begin
|
||||||
FEnabled := AConfig.GetValue(APath + 'Enabled', True);
|
FEnabled := AConfig.GetValue(APath + 'Enabled', True);
|
||||||
FExpression := AConfig.GetValue(APath + 'Expression', '');
|
FExpression := AConfig.GetValue(APath + 'Expression', '');
|
||||||
|
if AConfig.GetValue(APath + 'ClassAutoCast', False)
|
||||||
|
then Include(FEvaluateFlags, defClassAutoCast)
|
||||||
|
else Exclude(FEvaluateFlags, defClassAutoCast);
|
||||||
try ReadStr(AConfig.GetValue(APath + 'DisplayFormat', 'wdfDefault'), FDisplayFormat);
|
try ReadStr(AConfig.GetValue(APath + 'DisplayFormat', 'wdfDefault'), FDisplayFormat);
|
||||||
except FDisplayFormat := wdfDefault; end;
|
except FDisplayFormat := wdfDefault; end;
|
||||||
|
|
||||||
@ -8262,6 +8269,7 @@ begin
|
|||||||
AConfig.SetDeleteValue(APath + 'Expression', FExpression, '');
|
AConfig.SetDeleteValue(APath + 'Expression', FExpression, '');
|
||||||
WriteStr(s{%H-}, FDisplayFormat);
|
WriteStr(s{%H-}, FDisplayFormat);
|
||||||
AConfig.SetDeleteValue(APath + 'DisplayFormat', s, 'wdfDefault');
|
AConfig.SetDeleteValue(APath + 'DisplayFormat', s, 'wdfDefault');
|
||||||
|
AConfig.SetDeleteValue(APath + 'ClassAutoCast', defClassAutoCast in FEvaluateFlags, False);
|
||||||
|
|
||||||
FValueList.SaveDataToXMLConfig(AConfig, APath + 'ValueList/');
|
FValueList.SaveDataToXMLConfig(AConfig, APath + 'ValueList/');
|
||||||
end;
|
end;
|
||||||
@ -8354,6 +8362,9 @@ var
|
|||||||
begin
|
begin
|
||||||
Expression := AConfig.GetValue(APath + 'Expression/Value', '');
|
Expression := AConfig.GetValue(APath + 'Expression/Value', '');
|
||||||
Enabled := AConfig.GetValue(APath + 'Enabled/Value', true);
|
Enabled := AConfig.GetValue(APath + 'Enabled/Value', true);
|
||||||
|
if AConfig.GetValue(APath + 'ClassAutoCast', False)
|
||||||
|
then Include(FEvaluateFlags, defClassAutoCast)
|
||||||
|
else Exclude(FEvaluateFlags, defClassAutoCast);
|
||||||
i := StringCase
|
i := StringCase
|
||||||
(AConfig.GetValue(APath + 'DisplayStyle/Value', TWatchDisplayFormatNames[wdfDefault]),
|
(AConfig.GetValue(APath + 'DisplayStyle/Value', TWatchDisplayFormatNames[wdfDefault]),
|
||||||
TWatchDisplayFormatNames);
|
TWatchDisplayFormatNames);
|
||||||
@ -8368,6 +8379,7 @@ begin
|
|||||||
AConfig.SetDeleteValue(APath + 'Enabled/Value', Enabled, true);
|
AConfig.SetDeleteValue(APath + 'Enabled/Value', Enabled, true);
|
||||||
AConfig.SetDeleteValue(APath + 'DisplayStyle/Value',
|
AConfig.SetDeleteValue(APath + 'DisplayStyle/Value',
|
||||||
TWatchDisplayFormatNames[DisplayFormat], TWatchDisplayFormatNames[wdfDefault]);
|
TWatchDisplayFormatNames[DisplayFormat], TWatchDisplayFormatNames[wdfDefault]);
|
||||||
|
AConfig.SetDeleteValue(APath + 'ClassAutoCast', defClassAutoCast in FEvaluateFlags, False);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ =========================================================================== }
|
{ =========================================================================== }
|
||||||
|
@ -12,7 +12,7 @@ object WatchPropertyDlg: TWatchPropertyDlg
|
|||||||
ClientWidth = 420
|
ClientWidth = 420
|
||||||
Constraints.MinWidth = 400
|
Constraints.MinWidth = 400
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '0.9.31'
|
LCLVersion = '1.1'
|
||||||
object lblExpression: TLabel
|
object lblExpression: TLabel
|
||||||
AnchorSideTop.Control = txtExpression
|
AnchorSideTop.Control = txtExpression
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
@ -98,7 +98,6 @@ object WatchPropertyDlg: TWatchPropertyDlg
|
|||||||
Height = 19
|
Height = 19
|
||||||
Top = 64
|
Top = 64
|
||||||
Width = 62
|
Width = 62
|
||||||
AllowGrayed = True
|
|
||||||
BorderSpacing.Left = 6
|
BorderSpacing.Left = 6
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
Caption = 'Enabled'
|
Caption = 'Enabled'
|
||||||
|
@ -123,13 +123,16 @@ begin
|
|||||||
chkEnabled.Checked := True;
|
chkEnabled.Checked := True;
|
||||||
txtExpression.Text := AWatchExpression;
|
txtExpression.Text := AWatchExpression;
|
||||||
rgStyle.ItemIndex := 7;
|
rgStyle.ItemIndex := 7;
|
||||||
|
chkUseInstanceClass.Checked := False;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
txtExpression.Text := FWatch.Expression;
|
txtExpression.Text := FWatch.Expression;
|
||||||
chkEnabled.Checked := FWatch.Enabled;
|
chkEnabled.Checked := FWatch.Enabled;
|
||||||
rgStyle.ItemIndex := DispFormatToStyle[FWatch.DisplayFormat];
|
rgStyle.ItemIndex := DispFormatToStyle[FWatch.DisplayFormat];
|
||||||
|
chkUseInstanceClass.Checked := defClassAutoCast in FWatch.EvaluateFlags;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
lblRepCount.Enabled := False;
|
lblRepCount.Enabled := False;
|
||||||
txtRepCount.Enabled := False;
|
txtRepCount.Enabled := False;
|
||||||
lblDigits.Enabled := False;
|
lblDigits.Enabled := False;
|
||||||
|
Loading…
Reference in New Issue
Block a user