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