mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 08:32:35 +02:00
DBG: Ensure watches are enabled, after expression added via menu
git-svn-id: trunk@30507 -
This commit is contained in:
parent
d3cfc4ada0
commit
988bdbe88a
@ -657,6 +657,7 @@ procedure TDebugManager.mnuAddWatchClicked(Sender: TObject);
|
||||
var
|
||||
SE: TSourceEditor;
|
||||
WatchVar: String;
|
||||
w: TIDEWatch;
|
||||
begin
|
||||
SE := SourceEditorManager.GetActiveSE;
|
||||
|
||||
@ -668,8 +669,12 @@ begin
|
||||
WatchVar := SE.GetOperandAtCurrentCaret;
|
||||
if (WatchVar <> '') and SE.EditorComponent.Focused then
|
||||
begin
|
||||
if (Watches.Find(WatchVar) <> nil) or (Watches.Add(WatchVar) <> nil)
|
||||
w := Watches.Find(WatchVar);
|
||||
if w = nil
|
||||
then w := Watches.Add(WatchVar);
|
||||
if (w <> nil)
|
||||
then begin
|
||||
w.Enabled := True;
|
||||
ViewDebugDialog(ddtWatches, False);
|
||||
Exit;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user