mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 16:36:01 +02:00
IDE: Locals Dialog: evaluate all: avoid searching items by caption
git-svn-id: trunk@62986 -
This commit is contained in:
parent
cb317b9eb7
commit
608c82904f
@ -77,7 +77,7 @@ type
|
||||
procedure actWathExecute(Sender: TObject);
|
||||
private
|
||||
FUpdateFlags: set of (ufNeedUpdating);
|
||||
EvaluateAllCallbackCaption: string;
|
||||
EvaluateAllCallbackItem: TListItem;
|
||||
procedure CopyRAWValueEvaluateCallback(Sender: TObject; ASuccess: Boolean;
|
||||
ResultText: String; ResultDBGType: TDBGType);
|
||||
procedure CopyValueEvaluateCallback(Sender: TObject; ASuccess: Boolean;
|
||||
@ -352,9 +352,10 @@ var
|
||||
begin
|
||||
for I := 0 to lvLocals.Items.Count-1 do
|
||||
begin
|
||||
EvaluateAllCallbackCaption := lvLocals.Items[I].Caption;
|
||||
DebugBoss.Evaluate(EvaluateAllCallbackCaption, @EvaluateAllCallback, []);
|
||||
EvaluateAllCallbackItem := lvLocals.Items[I];
|
||||
DebugBoss.Evaluate(EvaluateAllCallbackItem.Caption, @EvaluateAllCallback, []);
|
||||
end;
|
||||
EvaluateAllCallbackItem := nil;
|
||||
end;
|
||||
|
||||
procedure TLocalsDlg.LocalsChanged(Sender: TObject);
|
||||
@ -516,15 +517,11 @@ end;
|
||||
|
||||
procedure TLocalsDlg.EvaluateAllCallback(Sender: TObject; ASuccess: Boolean;
|
||||
ResultText: String; ResultDBGType: TDBGType);
|
||||
var
|
||||
Item: TListItem;
|
||||
begin
|
||||
if ASuccess then
|
||||
begin
|
||||
ResultText := ExtractValue(ResultText, ResultDBGType.TypeName);
|
||||
Item := lvLocals.Items.FindCaption(0, EvaluateAllCallbackCaption, False, True, False, False);
|
||||
if Assigned(Item) then
|
||||
Item.SubItems[0] := ResultText+' ('+ResultDBGType.Value.AsString+')'; // xxx
|
||||
if Assigned(EvaluateAllCallbackItem) then
|
||||
EvaluateAllCallbackItem.SubItems[0] := ExtractValue(ResultText, ResultDBGType.TypeName);
|
||||
end;
|
||||
FreeAndNil(ResultDBGType);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user