mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 05:39:29 +02:00
Evaluate a expression when EvaluateDlg is already shown
git-svn-id: trunk@60045 -
This commit is contained in:
parent
8175bdfee6
commit
25cba76789
@ -101,6 +101,7 @@ type
|
||||
procedure Modify;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
procedure Execute(const AExpression: String);
|
||||
property FindText: string read GetFindText write SetFindText;
|
||||
end;
|
||||
|
||||
@ -149,6 +150,11 @@ begin
|
||||
mnuHistory.Items[2].Caption:=dsrEvalHistoryDown;
|
||||
end;
|
||||
|
||||
procedure TEvaluateDlg.Execute(const AExpression: String);
|
||||
begin
|
||||
SetFindText(AExpression);
|
||||
end;
|
||||
|
||||
procedure TEvaluateDlg.EvaluateCallback(Sender: TObject; ASuccess: Boolean;
|
||||
ResultText: String; ResultDBGType: TDBGType);
|
||||
var
|
||||
|
@ -1680,6 +1680,13 @@ begin
|
||||
else
|
||||
TIDEInspectDlg(CurDialog).Execute(SourceEditorManager.GetActiveSE.GetOperandAtCurrentCaret);
|
||||
end;
|
||||
if (CurDialog is TEvaluateDlg) and (SourceEditorManager.GetActiveSE <> nil)
|
||||
then begin
|
||||
if SourceEditorManager.GetActiveSE.SelectionAvailable then
|
||||
TEvaluateDlg(CurDialog).Execute(SourceEditorManager.GetActiveSE.Selection)
|
||||
else
|
||||
TEvaluateDlg(CurDialog).Execute(SourceEditorManager.GetActiveSE.GetOperandAtCurrentCaret);
|
||||
end;
|
||||
end;
|
||||
if not DoDisableAutoSizing then
|
||||
CurDialog.EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TDebugManager.ViewDebugDialog'){$ENDIF};
|
||||
|
Loading…
Reference in New Issue
Block a user